Naar de inhoud
Recognized by Laravel Match je project Contact

Houd je aan een standaard met automatisering

Voor het laatst bijgewerkt op:

Introductie

Het naleven van een bepaalde standaard kan handmatig of via geautomatiseerde tooling. Deze tooling kan de vorm aannemen van IDE-plugins, git hooks of CI/CD-stappen. Doordat de ontwikkelaar niet hoeft na te 'denken' over de exacte regels die in de standaard zijn gedefinieerd, ontstaat er ruimte voor het daadwerkelijke probleem zelf en niet voor de opmaak van de code.

Waarom

  • Door geautomatiseerde tooling in te zetten voor het naleven van de code (git hook, IDE-functies, geautomatiseerde CI/CD-acties) wordt er minder (menselijke) tijd en moeite besteed aan opmaak dan nodig is. Het kan en zou een non-issue moeten worden.
  • Automatisering zorgt voor een consistente toepassing van de gekozen standaard in de volledige codebase. Wanneer regels worden aangepast en/of bijgewerkt, kan automatisering opnieuw zorgen voor een consistente toepassing van de updates.

Geschikt voor

  • Middelgrote tot grote projecten

Minder geschikt voor

  • Voor kleinere projecten kan de IDE-integratie of het af en toe handmatig draaien van een tool volstaan om consistentie te waarborgen.

Meer info

Skill

Laravel Boost Skill

Gebruik deze skill om de richtlijn rechtstreeks toe te passen met een AI-assistent.

Use this skill when a Laravel task touches this best practice. It is self-contained so it can be installed independently by Laravel Boost or another agent-skill system.

## Core Guidance

Adhering to a given standard can be done manually or via automated tooling. This tooling can come in the form of IDE plugins, git hooks, CI/CD steps. The fact that the developer doesn't have to 'think' about the *exact* rules defined in the standard leaves room for the actual problem at hand and not the formatting of the code itself.

## Why It Matters

- By utilizing automated tooling for adhering to the code (git hook, IDE features, CI/CD automated actions) less (human) time and effort is spent on formatting than needed. It can and should become a non-issue.
- Automation ensures consistent application of the chosen standard across the entire codebase. When rules are adjusted and/or updated automation can again ensure consistent application of the updates.

## Apply When

- Medium to large projects

## Be Careful When

- Smaller projects might suffice with just the IDE-integration or manually running of a tool once in a while to ensure consistency.

## Canonical Source

- Full best practice: https://github.com/Dutch-Laravel-Foundation/best-practices/blob/main/code-standards/use-automation-to-adhere-to-a-standard/BEST_PRACTICE.md
- Dutch translation: https://github.com/Dutch-Laravel-Foundation/best-practices/blob/main/code-standards/use-automation-to-adhere-to-a-standard/translations/nl.md

## Workflow

1. Inspect the user's Laravel code before recommending changes.
2. Identify the narrow rule from this best practice that applies to the task.
3. Prefer Laravel's built-in conventions and documented APIs over custom abstractions.
4. Keep examples focused on this practice; reference other skills or practices when the task crosses boundaries.
5. Verify code changes with the project's available tests, linters, static analysis, or framework checks.

## Review Checklist

- The recommendation is Laravel-specific and grounded in this practice.
- Code examples use realistic Laravel file names, class names, and method names.
- The advice avoids mixing unrelated architecture, deployment, security, or testing topics.
- Related practices are mentioned when useful, but not re-explained in full.
- Dutch output, when requested, keeps framework and API names intact.