Skip to content

removing console log from use-natspec path#735

Merged
dbale-altoros merged 1 commit intoprotofire:developfrom
brossetti1:develop
Jan 13, 2026
Merged

removing console log from use-natspec path#735
dbale-altoros merged 1 commit intoprotofire:developfrom
brossetti1:develop

Conversation

@brossetti1
Copy link
Contributor

@brossetti1 brossetti1 commented Jan 12, 2026

solhint use-natspec debug console.log bug

Issue

#734

Bug Description

When the use-natspec rule is enabled, solhint 6.0.2 outputs debug console.log statements to stdout.

Steps to Reproduce

  1. Clone this repository
  2. Install dependencies:
    npm install
  3. Run solhint:
    npm run lint

Expected Behavior

Solhint should only output linting warnings/errors:

src/Example.sol
  6:1  warning  Missing @author tag in contract 'Example'  use-natspec
  7:5  warning  Missing @notice tag in variable 'value'    use-natspec

✖ 2 problems (0 errors, 2 warnings)

Actual Behavior

Debug output is printed to stdout before linting results:

isPublicLike :>>  false
comments.length :>>  2
type :>>  contract
isPublicLike :>>  false
comments.length :>>  0
type :>>  variable
isPublicLike :>>  true
comments.length :>>  2
type :>>  function
isPublicLike :>>  true
comments.length :>>  2
type :>>  function

src/Example.sol
  6:1  warning  Missing @author tag in contract 'Example'  use-natspec
  7:5  warning  Missing @notice tag in variable 'value'    use-natspec

✖ 2 problems (0 errors, 2 warnings)

Environment

  • solhint version: 6.0.2
  • Node.js version: v22.x (tested)
  • OS: macOS

Root Cause

The file node_modules/solhint/lib/rules/naming/use-natspec.js contains debug console.log statements that were not removed before release.

Workaround

Disable the use-natspec rule in .solhint.json:

{
  "rules": {
    "use-natspec": "off"
  }
}

@dbale-altoros
Copy link
Collaborator

@brossetti1 GOOD CATCH!!! thanks a lot!

@dbale-altoros dbale-altoros merged commit 548c4d4 into protofire:develop Jan 13, 2026
10 checks passed
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