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

Disable for transient variabbles #633

Open
maikelordaz opened this issue Jan 26, 2025 · 6 comments
Open

Disable for transient variabbles #633

maikelordaz opened this issue Jan 26, 2025 · 6 comments

Comments

@maikelordaz
Copy link

maikelordaz commented Jan 26, 2025

Is there a way to disable the linter for transient variables?

Is always showing it as an error for me, and that mess up with the format on save

Image

@dbale-altoros
Copy link
Collaborator

@maikelordaz
is the // solhint-disable-next-line not working ?
what is the rule that is giving you the error ?

maybe is the parser not recognizing that and needs an update...
let me check
in the meanwhile try to answer my question to see if we can do something directly in solhint

@maikelordaz
Copy link
Author

@dbale-altoros no it does not work with // solhint-disable-next-line and I'm not sure which rule I can use for this as I dont find any that suits in the documentation

Image

@dbale-altoros
Copy link
Collaborator

are you sure this is a solhint issue ?
seems to me that if you disable solhint entirely you will receive same error

do you have a linter installed ?
what solc and pragma are you using ?

@maikelordaz
Copy link
Author

@dbale-altoros my solc version is 0.8.28, so there is no problem there, the transient keyword it is fully supported for that pragma in the legacy pipeline. If I change my linter to solium/ethlint I dont receive the error, only get it with solhint

In the next image you can see the pragma declaration, the error lint in the left, in the right solhint selected, at the bottom the solc version, no // solhint-disable-next-line here

Image

In the next image you can see the pragma declaration, the error lint in the left, in the right solhint selected, at the bottom the solc version, and // solhint-disable-next-line before every line

Image

In the next image you can see the pragma declaration, no error lint in the left, in the right solium selected, at the bottom the solc version

Image

In the next image you can see the pragma declaration, in the right solium selected, at the bottom the solc version, in the left I just erased a ; to show that solium it is not disabled, it is showing the error of the missing ;

Image

@dbale-altoros
Copy link
Collaborator

thanks, @maikelordaz for the screen and the work to explain your issue
let me see what i can do with this and how to solve it

again, thanks for your feedback

@dbale-altoros
Copy link
Collaborator

dbale-altoros commented Mar 3, 2025

@maikelordaz
can you do one more test for me ?
please execute solhint from the command line to one of the files having the transient keyword and paste here the results?
npx solhint ./pathToFile.sol

also paste your .solhint.json
and please check solhint version... in 5.05 transient variables are supported

Thanks!

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

No branches or pull requests

2 participants