You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

global-linters

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

global-linters

Linter wrappers for globally installed linters

0.1.5
latest
Source
npmnpm
Version published
Maintainers
1
Created
Source

global-linters

Linter wrapper for globally installed linters.

Table of contents

  • Badges
  • CLI
  • API
  • License

Badges

BadgeDescriptionService
code styleCode stylePrettier
Conventional Commits: 1.0.0Commit styleConventional Commits
Code coverageCode coverageCodecov
Shippable build statusCI status: Build and testShippable
Travis CI build statusCI status: Commit styleTravis CI
npm versionnpm package versionnpm

CLI

Run the CLI without any arguments to see the options. The options are also described in the table and paragraphs below.

ArgumentUsageTypeReference
linterRequiredString [hadolint, shellcheck]details
globRequiredStringdetails
--ignore-path, -iOptionalStringdetails
--range, -rOptionalStringdetails
--optionsOptionalStringdetails
—version, -vOptionalBooleandetails
—help, -hOptionalBoolean

linter

Linter to run. Currently the list below shows the supported linter. If your favourite linter is not supported, please create a ticket to discuss adding support for it.

  • hadolint - Dockerfile Linter

    A smarter Dockerfile linter that helps you build best practice Docker images. The linter is parsing the Dockerfile into an AST and performs rules on top of the AST. It is standing on the shoulders of ShellCheck to lint the Bash code inside RUN instructions.

  • shellcheck - A shell script static analysis tool

    The goals of ShellCheck are

    • To point out and clarify typical beginner's syntax issues that cause a shell to give cryptic error messages.
    • To point out and clarify typical intermediate level semantic problems that cause a shell to behave strangely and counter-intuitively.
    • To point out subtle caveats, corner cases and pitfalls that may cause an advanced user's otherwise working script to fail under future circumstances.

glob

Glob pattern for searching files. The glob syntax of the glob module is used, so the given pattern must be according to the syntax of node-glob.

--ignore-path, -i

Path to a file containing patterns that describe files to ignore. By default it looks for ./.prettierignore. The patterns in the ignore file should be according to the .gitignore specification.

--range, -r

Version range the linter must satisfy. The range must be specified according to the node-semver ranges specification and will show an error otherwise. This option only works if the linter supports a version option, which for some linters is not included in early versions. The table below shows for which versions of each supported linter the range option is supported.

LinterRange option supported from versionReference
hadolint>=1.2.0v1.2 release notes.
shellcheck>=0.3.1Commit 4e5d32b.

--options

Options to pass to the linter. When using string arguments that include dashes (-), those will be seen as a separate option by the shell instead of part of the string. The problem is that shells like bash tend to strip quotes. The solution for this is to wrap the string in two sets of quotes of which there are two options.

  • Use double quotes inside single quotes.

    --options '"--hello -x=yes -v"'
    
  • Use escaped double quotes inside double quotes.

    --options "\"--hello -x=yes -v\""
    

--version, -v

Display only the version number and exit the process.

API

These docs will be added in the first (full) release 1.0.0.

License

This project is licensed under the GPLv3 license.

Copyright © 2019 Jeroen de Bruijn

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

The full text of the license is available in the LICENSE.md file in this repository and online.

FAQs

Package last updated on 17 Oct 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts