Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added watch option to re-run the linters when a file changes ⌚️ #2

Merged
merged 4 commits into from
Jun 18, 2024

Conversation

01taylop
Copy link
Owner

@01taylop 01taylop commented Jun 17, 2024

Details

What have you changed?

  • Added watch option to re-run the linters when a file either changes, is added, or deleted.

Why are you making these changes?

  • Re-running the lint checks when a file changes is a useful feature to engineers. At the stage all files are re-linted when a file is changed. Though this could change;
    • Option 1: Re-lint only the file which changed, and ask the user if they would like to lint all files again after.
      • This would be beneficial to quickly fix a single file and then move onto the next.
    • Option 2: Set up different watchers for the different linters and only re-run the relevant one.
      • This one would provide for a faster feedback loop.
    • The concern with both options is that providing a green success message may be confusing as there may be lint errors in other files which have not been re-linted.
    • Option 3: Keep track of lint errors, update that when a single file is linted again, and display all of the results again.
      • This option requires more work and must not introduce confusing or misleading results.

@01taylop 01taylop changed the title Added watch option to re-run the linters when a file chanegs ⌚️ Added watch option to re-run the linters when a file changes ⌚️ Jun 17, 2024
@01taylop 01taylop marked this pull request as ready for review June 18, 2024 09:31
@01taylop 01taylop merged commit 0e9ef59 into main Jun 18, 2024
5 checks passed
@01taylop 01taylop deleted the file-watch branch June 18, 2024 09:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant