Skip to content

Conversation

@MikaelVallenet
Copy link
Member

@MikaelVallenet MikaelVallenet commented Dec 4, 2025

New Proposal for Linter Extension Rules

I did this first PR #4913 to implement linting warning on avl tree iterate method without limit.
It was a "savage" PoC mixing preprocessing and linting logic.

This PR is an improved proposal with a lintrules interface and where each enabled implementations will run a function on all the nodes of the AST. (The AST traversal is done one time, but each node traversed applied the ruleset enabled)

The question is should i keep going in this way or do i go in the wrong direction ?


My next steps would be:

  • Clean the code, improved the naming, the interface and implementations
  • Allow in the CLI to enable/disable rules with a default preset

Small drawing of what i did

image

cc @moul @aeddi @thehowl

@Gno2D2
Copy link
Collaborator

Gno2D2 commented Dec 4, 2025

🛠 PR Checks Summary

All Automated Checks passed. ✅

Manual Checks (for Reviewers):
  • IGNORE the bot requirements for this PR (force green CI check)
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)
🟢 Pending initial approval by a review team member, or review from tech-staff

☑️ Contributor Actions:
  1. Fix any issues flagged by automated checks.
  2. Follow the Contributor Checklist to ensure your PR is ready for review.
    • Add new tests, or document why they are unnecessary.
    • Provide clear examples/screenshots, if necessary.
    • Update documentation, if required.
    • Ensure no breaking changes, or include BREAKING CHANGE notes.
    • Link related issues/PRs, where applicable.
☑️ Reviewer Actions:
  1. Complete manual checks for the PR, including the guidelines and additional checks if applicable.
📚 Resources:
Debug
Automated Checks
Maintainers must be able to edit this pull request (more info)

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 The pull request was created from a fork (head branch repo: MikaelVallenet/gno)

Then

🟢 Requirement satisfied
└── 🟢 Maintainer can modify this pull request

Pending initial approval by a review team member, or review from tech-staff

If

🟢 Condition met
└── 🟢 And
    ├── 🟢 The base branch matches this pattern: ^master$
    └── 🟢 Not (🔴 Pull request author is a member of the team: tech-staff)

Then

🟢 Requirement satisfied
└── 🟢 If
    ├── 🟢 Condition
    │   └── 🟢 Or
    │       ├── 🔴 At least one of these user(s) reviewed the pull request: [jefft0 leohhhn n0izn0iz notJoon omarsy x1unix] (with state "APPROVED")
    │       ├── 🔴 At least 1 user(s) of the team tech-staff reviewed pull request
    │       └── 🟢 This pull request is a draft
    └── 🟢 Then
        └── 🟢 Not (🔴 This label is applied to pull request: review/triage-pending)

Manual Checks
**IGNORE** the bot requirements for this PR (force green CI check)

If

🟢 Condition met
└── 🟢 On every pull request

Can be checked by

  • Any user with comment edit permission

@codecov
Copy link

codecov bot commented Dec 4, 2025

Codecov Report

❌ Patch coverage is 44.79167% with 53 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
gnovm/cmd/gno/lintrules/avl-limit.go 16.27% 36 Missing ⚠️
gnovm/cmd/gno/lint.go 81.81% 6 Missing and 2 partials ⚠️
gnovm/pkg/gnolang/preprocess.go 0.00% 5 Missing ⚠️
gnovm/pkg/gnolang/types.go 0.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@MikaelVallenet MikaelVallenet moved this to NEED PEER REVIEW (INTERNAL) in FlashorgSprint: Gnocore Minicrew 🥷 Dec 5, 2025
@Kouteki Kouteki requested review from moul and zivkovicmilos December 5, 2025 13:42
@Kouteki Kouteki moved this from Triage to In Progress in 🧙‍♂️Gno.land development Dec 5, 2025
@Kouteki Kouteki requested a review from aeddi December 5, 2025 13:43
@Kouteki Kouteki moved this from In Progress to In Review in 🧙‍♂️Gno.land development Dec 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📦 🤖 gnovm Issues or PRs gnovm related 🧾 package/realm Tag used for new Realms or Packages.

Projects

Status: No status
Status: In Review

Development

Successfully merging this pull request may close these issues.

2 participants