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

Update Solhint Configuration #54

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Vineetkg20
Copy link

This pull request updates the Solhint configuration file to enhance linting rules for better code quality and enforce stricter visibility constraints. The changes include modifying the func-visibility rule to an error level and setting ignoreConstructors to false, ensuring that constructors adhere to visibility constraints. Additionally, a maximum line length of 120 characters has been established to improve code readability. The configuration now includes a warning for unused variables to promote cleaner code and disallows the use of with to prevent confusion. Empty blocks are no longer permitted, ensuring that all logic is complete. The constructor-super rule is now enforced, requiring super calls in constructors when inheriting from another contract. Furthermore, a warning has been added against relying on block timestamps, and each import statement is enforced to import only one file to enhance modularity. Inline assembly is disallowed to mitigate potential security risks, and naming conventions for variables have been reinforced while ignoring destructuring. Finally, the use of revert() for error handling is required. Overall, this update aims to improve code quality and maintainability within the project by encouraging adherence to best practices and facilitating early detection of potential issues.

@Vineetkg20 Vineetkg20 changed the title Updated .solhint.json Update Solhint Configuration Oct 18, 2024
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