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

Fix linting issue #291

Closed
jcadam14 opened this issue Jan 14, 2025 · 8 comments · Fixed by #294
Closed

Fix linting issue #291

jcadam14 opened this issue Jan 14, 2025 · 8 comments · Fixed by #294
Assignees

Comments

@jcadam14
Copy link
Contributor

Linting with black is failing on a file that was merged into main even though it did NOT fail on the PR.

@jcadam14 jcadam14 self-assigned this Jan 14, 2025
@michaeljwood
Copy link
Contributor

michaeljwood commented Jan 17, 2025

I believe the linting issue was fixed with #292 , but I realized that the linter is not configured to run on PRs linters.yml, and because I was working on a fork, the action did not run on push to my fork.

I admit I could/should have caught this locally, but should probably make sure that runs on PRs (to main at least). I believe the sbl-filing-api at least also has this potential issue.

@jcadam14
Copy link
Contributor Author

I believe the linting issue was fixed with #292 , but I realized that the linter is not configured to run on PRs linters.yml, and because I was working on a fork, the action did not run on push to my fork.

I admit I could/should have caught this locally, but should probably make sure that runs on PRs (to main at least). I believe the sbl-filing-api at least also has this potential issue.

Linters used to run on all our PRs, very common to have the checks fail due to someone not running black and ruff locally before pushing up (at least in the past, we've gotten pretty good about that now). So yeah I'm a little baffled why that stopped. I'll dig and figure out what broke. But linting was a thing, now it appears it's not in our repos.

michaeljwood added a commit to michaeljwood/regtech-user-fi-management that referenced this issue Jan 17, 2025
@jcadam14
Copy link
Contributor Author

Going to update this story to include updating the linter.yaml with

on:
  pull_request:
  push:
    branches:
      - "main"

@michaeljwood
Copy link
Contributor

Didn't notice your comment until just now. Did you think it was important to run when pushing to main only? I had pushed a change to add the PR bit, but left it as pushes to any branch.

@jcadam14
Copy link
Contributor Author

jcadam14 commented Jan 17, 2025

Didn't notice your comment until just now. Did you think it was important to run when pushing to main only? I had pushed a change to add the PR bit, but left it as pushes to any branch.

Personally I dislike when I'm on a prototype/test/sandbox branch where I'm just playing around with different approaches, getting emails that my branch failed linting because during that phase I don't really care about it. Only when I'm ready to make the code official do I think linting needs to be considered. That's my personal preference. @lchen-2101 thoughts? Push to main or just any push?

@jcadam14
Copy link
Contributor Author

Looking more at the other repos, we are getting linting running on other PRs, so must be something with the way you used a fork perhaps, not sure. Probably better to explicitly call it out like we do with tests

@lchen-2101
Copy link
Collaborator

just to main sounds good to me, not a fan of getting notified on all the branches; and yeah, we haven't done much with forks, so new territory for us.

michaeljwood added a commit to michaeljwood/regtech-user-fi-management that referenced this issue Jan 17, 2025
@michaeljwood
Copy link
Contributor

Although you can just disable actions on the fork, I think my issue was more that I just didn't notice the failure because it was not noisy and did not stop me from opening the PR, so I just missed it.

jcadam14 pushed a commit that referenced this issue Jan 20, 2025
closes #291

Should verify this actually did run the linter actions before merging. I
did notice it ran the actions on my branch, so I must have just missed
those running before.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants