Indention issues in Assembly blocks
See original GitHub issueAs far as I can see from my testing, solhint doesn’t notice indentation issues inside assembly{}
blocks.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Gracefully indenting structs and assembly blocks. #72 - GitHub
I assume the struct issue is somehow related to c-mode or cc-mode that solidity-mode derives from.
Read more >ASM indentation style - nesdev.org
The whole concept of indenting feels misguided. Assembly doesn't nest, and the control flow it produces often jumps around in a way that...
Read more >Indenting for nasm directives and macros - Stack Overflow
I like to take a cue from C preprocessor style here, and indent NASM preprocessor directives all the way to the left. (Or...
Read more >Assembly Language Style Guidelines - Statement Organization
Indentation works great when you have a block structured language. Assembly language, however, is the original unstructured language and indentation rules ...
Read more >asm, Do you indent your Assembly language source code?
The problem is, I'm NOT used to seeing assembly ... because program flow controlled by JMPs does not produce *blocks*
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @fvictorio we’re actually linting the code blocks in the Solidity docs, so prettier isn’t an option right now, but thanks for the heads up and I will use it in standalone contracts
Oh, yes, let me clarify.
The issue you are reporting is right. But fixing it will probably be very low priority for us, since working on that stuff sort of duplicates the work done on
prettier-plugin-solidity
. That’s why we encourage people to use that.With respect to the report: it will tell you where the problem is, and how to fix it, but in practice it’s not a very readable message (not cryptic, just not that useful). You can see some examples in the eslint plugin readme, since we use the same underlying library.
So when that happens, you either run prettier on the file, or fix it manually if you immediately detect the problem (“oh, I entered two spaces”). That’s my experience at least.
Hope that makes sense!