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.

Example for excluding multiple rules

See original GitHub issue

I tried the below in VSCode, but it doesn’t seem to be excluding anything…

{
  "output" : [ ],
  "rule" : [ ],
  "excludes" : [ 
    {
      "code" : "VAR_HAS_PREFIX_OR_POSTFIX"
    },
    {
      "code" : "MISSING_VAR"
    },
    {
      "code" : "VAR_INVALID_NAME"
    },
    {
      "code" : "MISSING_VAR"
    },
    {
      "code" : "FUNCTION_TOO_COMPLEX"
    }
  ],
  "includes" : [ ],
  "inheritParent" : false,
  "inheritPlugins" : true
}

If I restart VSCode when there is a .cflintrc file, it doesn't seem to do any linting.  If I remove it, it processes all rules, but I'm trying to find a way to exclude some.

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:11 (3 by maintainers)

github_iconTop GitHub Comments

4reactions
ryaneberlycommented, Nov 3, 2017

I would be inclined to move some of the rather opinionated naming rules to be disabled by default in a future release - there are more important things to lint. IMO. Thoughts?

On Thu, Nov 2, 2017 at 7:55 PM, Kai Koenig notifications@github.com wrote:

I’m not sure what’s going on specifically with VSCode and that might be a totally separate issue.

For a start: could you please test the .cflintrc file with plain command-line CFLint in your setup and let us know if that creates the results you expect?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/cflint/CFLint/issues/485#issuecomment-341592171, or mute the thread https://github.com/notifications/unsubscribe-auth/AFtZuwRsksvByQxUOcLdmxbcxtvD3uBoks5sylaBgaJpZM4QQJ5N .

0reactions
ryaneberlycommented, Dec 20, 2017

@rsmolkin, when I run your example I get a “could not read config file” on the stderr.

IT does not like the duplicate MISSING_VAR, the following will work for you:

{
  "rule" : [ ],
  "excludes" : [
    {"code": "VAR_HAS_PREFIX_OR_POSTFIX"},
    {"code": "MISSING_VAR"},
    {"code": "VAR_INVALID_NAME"},
    {"code": "FUNCTION_TOO_COMPLEX"},
    {"code": "VAR_IS_TEMPORARY"},
    {"code": "SCOPE_ALLCAPS_NAME"}
  ], 
  "includes": [ ],
  "inheritParent" : true
}

I added a bit more info to the error message.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Excluding multiple values in t-sql - Stack Overflow
Why the complex EXCEPT ? Doesn't this work?: SELECT * FROM Table Z WHERE NOT ( ( A= 2 and B= 10 and...
Read more >
6 rsync Examples to Exclude Multiple Files and Directories ...
6 rsync Examples to Exclude Multiple Files and Directories using exclude-from · 1. Exclude a specific directory · 2. Exclude multiple directories ...
Read more >
How to Exclude Values in COUNTIF - YouTube
How to Exclude Values in COUNTIF | COUNTIFS NOT EQUAL to Multiple Text | Exclude Values from List.
Read more >
Snort Excluding Multiple Ports From ShellCode rules
How can I specify mutliple ports to exclude from shellcode rules? I'm using the latest version of snort. I'm also interested in knowing...
Read more >
Using the IN, NOT, and LIKE Operators in SQL - Universal Class
SQL gets complex when you have multiple business rules that run how you return record sets ... The following query gives you an...
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