question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Indention issues in Assembly blocks

See original GitHub issue

As far as I can see from my testing, solhint doesn’t notice indentation issues inside assembly{} blocks.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ChrisChinchillacommented, Jun 11, 2019

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

1reaction
fvictoriocommented, May 30, 2019

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!

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found