Skip to content

Conversation

@surge119
Copy link
Contributor

@surge119 surge119 commented Aug 9, 2024

Summary

If a rule defined in a config contains an error or causes an error in Fixit, the linter will raise an unrecoverable error. This PR adds error handling to catch and log those errors as warnings, and continue linting

Test Plan

$ hatch run fixit lint ./src/fixit/api.py
WARNING:fixit.config:Failed to load rules 'fixit.rules': CollectionError: could not import rule(s) fixit.rules
🧼 1 file clean 🧼

# Run with good rules
$ hatch run fixit lint ./src/fixit/api.py
🧼 1 file clean 🧼

@surge119 surge119 requested review from amyreese and zsol as code owners August 9, 2024 17:54
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 9, 2024
@amyreese amyreese merged commit dfd84cb into Instagram:main Aug 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants