-
Notifications
You must be signed in to change notification settings - Fork 441
feat(lint): poc avl tree usage limit #4913
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
base: master
Are you sure you want to change the base?
feat(lint): poc avl tree usage limit #4913
Conversation
🛠 PR Checks SummaryAll Automated Checks passed. ✅ Manual Checks (for Reviewers):
Read More🤖 This bot helps streamline PR reviews by verifying automated checks and providing guidance for contributors and reviewers. ✅ Automated Checks (for Contributors):🟢 Maintainers must be able to edit this pull request (more info) ☑️ Contributor Actions:
☑️ Reviewer Actions:
📚 Resources:Debug
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
|
Thank you @MikaelVallenet. Before we move too far in this direction, I think it’s a good moment to discuss whether we want the official linter to start including this kind of specialized rule. On one hand, I love the idea. One of the strengths of Go is that it provides strong built-in tooling (linter, tests, coverage, docs, formatter, etc). On the other hand, we may choose minimalism for the monorepo and keep extra lint rules as optional extensions. But in that case, optional linters tend to become either always expected or often forgotten, which creates inconsistency. My personal vote is to allow this specialization, but I would like more people to give their input before we commit to a direction. And just to be clear. I’m not talking about how it should be implemented yet. There’s a separate question about whether this belongs in the preprocessor as you did, in cmd/lint.go, or elsewhere. Before discussing implementation details, we first need to decide whether this monorepo should officially include more opinionated lint rules or not. |
|
I feel that for this kind of opinionated rules it would make sense to group them under a single 'official' linter and to document them in the monorepo (to explain why this rule exists, its technical implications, the best practices to fix or improve code that triggers it, etc.). However, it could also be useful to have a system like |
|
We should have two rule layers:
Both lists should evolve over time. In the future, we may also want the linter to be runnable by an oracle service, which could publish audit reports on-chain. Gnoweb could then display the latest rule-checks, even when the contract itself hasn’t changed. |
It's a PoC for me
I would like to find how efficiently retrieve the comment just above the call to tree.Iterate or tree.ReverseIterate
fix #4421