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

slither-disable-next-line is not working in --checklist mode ? #1609

Closed
abcfy2 opened this issue Jan 17, 2023 · 4 comments
Closed

slither-disable-next-line is not working in --checklist mode ? #1609

abcfy2 opened this issue Jan 17, 2023 · 4 comments
Labels
documentation enhancement New feature or request

Comments

@abcfy2
Copy link

abcfy2 commented Jan 17, 2023

Describe the issue:

I've set // slither-disable-next-line in my code:

// slither-disable-next-line dead-code
function _isAllowedParent(address _contract) internal view returns (bool) {
     return _allowedParents[_contract] > 0;
}

And It's working without --checklist:

$ slither .
'npx hardhat clean' running (wd: my-contracts)
'npx hardhat clean --global' running (wd: my-contracts)
'npx hardhat compile --force' running
Downloading compiler 0.8.16
Compiled 70 Solidity files successfully

. analyzed (70 contracts with 83 detectors), 0 result(s) found

But when I add --checklist, it seems all the comments not working:

$ slither . --checklist
Summary
 - [uninitialized-local](#uninitialized-local) (1 results) (Medium)
 - [unused-return](#unused-return) (1 results) (Medium)
 - [calls-loop](#calls-loop) (2 results) (Low)
 - [variable-scope](#variable-scope) (1 results) (Low)
 - [reentrancy-events](#reentrancy-events) (2 results) (Low)
 - [dead-code](#dead-code) (5 results) (Informational)
 - [low-level-calls](#low-level-calls) (2 results) (Informational)
 - [naming-convention](#naming-convention) (12 results) (Informational)
 - [unimplemented-functions](#unimplemented-functions) (1 results) (Informational)
 - [unused-state](#unused-state) (1 results) (Informational)
 ...
## dead-code
Impact: Informational
Confidence: Medium
 - [ ] ID-7
[MyContracts._isAllowedParent(address)](contracts/MyContracts.sol#L67-L69) is never used and should be removed

contracts/MyContracts.sol#L67-L69
...

Code example to reproduce the issue:

// slither-disable-next-line dead-code
function _isAllowedParent(address _contract) internal view returns (bool) {
     return _allowedParents[_contract] > 0;
}

Version:

0.9.2

Relevant log output:

No response

@abcfy2 abcfy2 added the bug-candidate Bugs reports that are not yet confirmed label Jan 17, 2023
@0xalpharush
Copy link
Contributor

The --checklist flag currently sets --show-ignored-findings and includes findings with the "disable" comments. This should be documented, and there should be a way to generate a checklist without ignored findings.

@0xalpharush 0xalpharush added enhancement New feature or request documentation and removed bug-candidate Bugs reports that are not yet confirmed labels Jan 17, 2023
@0xalpharush 0xalpharush changed the title [Bug-Candidate]: slither-disable-next-line is not working in --checklist mode ? slither-disable-next-line is not working in --checklist mode ? Jan 17, 2023
@abcfy2
Copy link
Author

abcfy2 commented Jan 17, 2023

The --checklist flag currently sets --show-ignored-findings and includes findings with the "disable" comments. This should be documented, and there should be a way to generate a checklist without ignored findings.

Thanks. Is there any way to generate markdown format report without --show-ignored-findings ?

@0xalpharush
Copy link
Contributor

Not currently, but we will add this feature

@0xalpharush
Copy link
Contributor

Closed by #1643

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants