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

Run linter only on diff #2

Open
Del-S opened this issue Apr 21, 2022 · 0 comments
Open

Run linter only on diff #2

Del-S opened this issue Apr 21, 2022 · 0 comments
Assignees

Comments

@Del-S
Copy link
Collaborator

Del-S commented Apr 21, 2022

  1. Get diff file: git.diff_for_file(filename).patch.
  2. Split the diff file based on @@.
  3. Run on log linter on each modified line (starts with +, ignore the - since we do not want to lint removed logs). Remove all logs which do not contain ^\+ regex should work.
  4. Figure out which line should be marked with the warning (parse @@ line indexes @@ ).
@Del-S Del-S self-assigned this Apr 21, 2022
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

No branches or pull requests

1 participant