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 naming convention check #1969

Merged

Conversation

RunDevelopment
Copy link
Member

Follow up to #1968. This PR adds the actual naming convention check as well as a mode for automatically fixing improperly named functions and files.

The naming convention check + fix itself is rather simple. It's just a small function. The interesting bit is the stuff around it.
I generalized the TYPE_CHECK_LEVEL logic to (1) include a FIX check level, and (2) added a NAME_CHECK_LEVEL. So name check is controlled via env vars just like the type check. There is now also a CHECK_LEVEL env var to control both at once. CHECK_LEVEL will be very useful if we add more checks in the future.

I also changed the check level from WARN to FIX for npm run dev. This has the interesting effect that the server will automatically rename functions and files when you change the name of a node.

@RunDevelopment RunDevelopment marked this pull request as ready for review July 23, 2023 13:20
@joeyballentine joeyballentine merged commit 009832c into chaiNNer-org:main Jul 24, 2023
14 checks passed
@RunDevelopment RunDevelopment deleted the naming-convention-check branch July 24, 2023 10:56
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.

2 participants