Comments (8)
This is a good suggestion. Numbering error messages to allow things like this is something I've been meaning to do for quite a while.
from shellcheck.
Added --exclude
in fbd85e9
from shellcheck.
Great. Can you give an example of using it?
from shellcheck.
shellcheck --exclude=SC2086,SC2035 file
There's no config file yet, but you can make it somewhat more persistent by adding an alias in .bashrc
:
alias shellcheck='shellcheck --exclude=SC2086'
from shellcheck.
Ah, I see that I failed to use markdown properly when first filing this issue.
Using pylint it is possible to write the disabled checks in comments in the source, close to the location where it should take effect.
# pylint: disable-msg=C0103
a = 1 # pylint will not complain about the one character variable name
That would make this feature even more useful
from shellcheck.
I tried finding some docs on how this is scoped, but couldn't and I don't want to try it and see. Does pylint does this per line, per structure or per file?
from shellcheck.
I believe it is scoped by python's scope. A # pylint: -line at the start of a method affects that method. One at the start of a file affects that file.
But even whole-file scoped would help compared to having to use command aliases (or Makefiles).
from shellcheck.
I added #43 for this functionality.
from shellcheck.
Related Issues (20)
- server1 | UNREACHABLE! => { "changed": false, "msg": "Failed to connect to the host via ssh: [email protected]: Permission denied (publickey).", "unreachable": true }
- SC1010 thrown for ``words=(do da di)``
- Shadowing `local` should throw a warning
- SC2050 "expression is constant" when checking against a file
- [Bug]: Shell check ignore is not working
- not detecting malformed brace matching
- Fixing typo "Parentesis"
- SC2319 - changed with Shellcheck 0.10.0 HOT 4
- Cache / save the check results and reuse them
- SC2027 doesn't account for escaped quotes HOT 1
- ksh ~(N) null glob pattern prefix causes error SC1036
- Documentation for SC3061 and others disapeared ? HOT 7
- SC2181 misleading for errexit
- if $variable; then should throw an error because it does not do what many inexperienced people expect it to do
- Offer `system`-style `pre-commit` hook alongside the `docker` one
- Shellcheck throws an error and stops parsing on valid bash code when you open a file descriptor for a code block using an array index variable
- SC2062 with deliberate shell expression for portable tab HOT 1
- Suggested improvement for SC2006's "Did you mean" alternative message
- Question: Should ls -1 -b be acceptable for SC2012
- Feature request: disable directives in fles HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from shellcheck.