solhint icon indicating copy to clipboard operation
solhint copied to clipboard

Update examples in the "Configure linter with comments" section

Open fvictorio opened this issue 5 years ago • 6 comments

At the very least, the rule used for those examples is deprecated, but the whole section could probably use a revamp too.

fvictorio avatar Aug 13 '19 13:08 fvictorio

Section mentioned is this one - https://github.com/protofire/solhint/blob/master/docs/configuration.md#configure-linter-with-comments

Approval on issue is from @fvictorio help on writing side from @chrischinchilla

ChrisChinchilla avatar Aug 14 '19 13:08 ChrisChinchilla

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


This issue now has a funding of 100.0 DAI (100.0 USD @ $1.0/DAI) attached to it as part of the ConsenSys fund.

gitcoinbot avatar Aug 23 '19 03:08 gitcoinbot

@fvictorio can you please explain what do you mean by "the rule used for those examples is deprecated", because i am not sure to understand well if we are talking about the same thing. throw is indeed deprecated in solidity but this is why this rule exists, a warning to the user who tries to use this old solidity feature. So the example in your doc is fine.

/* solhint-disable avoid-throw */
  if (a > 1) {
    throw;
  }
  /* solhint-enable avoid-throw */

By reading the code the comment directive is fine and works well, it avoids to trigger the "throw" is deprecated, avoid to use it. warning. code here Maybe you would mean that we should use other kind of examples (maybe not critical security rules) with or for replacing this one ?

akersof avatar Aug 23 '19 12:08 akersof

Oops, sorry, my bad. I was talking specifically about the compiler-fixed and compiler-gt-0_4 rules, the other ones seem fine.

fvictorio avatar Aug 23 '19 14:08 fvictorio

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


Work for 100.0 DAI (100.0 USD @ $1.0/DAI) has been submitted by:

  1. @akersof

@datakarima please take a look at the submitted work:

  • PR by @akersof

gitcoinbot avatar Aug 23 '19 18:08 gitcoinbot

Issue Status: 1. Open 2. Started 3. Submitted 4. Done


The funding of 100.0 DAI (100.0 USD @ $1.0/DAI) attached to this issue has been approved & issued to @akersof.

gitcoinbot avatar Aug 29 '19 14:08 gitcoinbot