Skip to content

Commit

Permalink
Correct spelling of containername argument.
Browse files Browse the repository at this point in the history
Spell the new mega-linter-runner argument container-name for consistency
with the package name, mega-linter-runner, and to spare users from
needing to add containername as a CSpell exception.
  • Loading branch information
Kurt-von-Laven committed Sep 22, 2022
1 parent c7f7595 commit 3a9c9ef
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion .github/linters/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -481,7 +481,6 @@
"conda",
"configfile",
"configfiles",
"containername",
"contextlib",
"contextmanager",
"copypaste",
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-hooks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
require_serial: true
args:
- mega-linter-runner
- --containername "megalinter-$(basename "$PWD")"
- --container-name "megalinter-$(basename "$PWD")"
- --remove-container
- --fix
- --env
Expand Down Expand Up @@ -35,7 +35,7 @@
require_serial: true
args:
- mega-linter-runner
- --containername "megalinter-all-$(basename "$PWD")"
- --container-name "megalinter-all-$(basename "$PWD")"
- --remove-container
- --fix
- --env
Expand Down
2 changes: 1 addition & 1 deletion mega-linter-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ The options are only related to mega-linter-runner. For MegaLinter options, plea
| `-h` <br/> `--help` | Show mega-linter-runner help | <!-- --> |
| `-v` <br/> `--version` | Show mega-linter-runner version | <!-- --> |
| `-i` <br/> `--install` | Generate MegaLinter configuration files | <!-- --> |
| `--containername` | Specify MegaLinter container name | <!-- --> |
| `--container-name` | Specify MegaLinter container name | <!-- --> |
| `--remove-container` | Remove MegaLinter Docker container when done | <!-- --> |

_You can also use `npx mega-linter-runner` if you do not want to install the package_
Expand Down
2 changes: 1 addition & 1 deletion mega-linter-runner/lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ module.exports = optionator({
description: "Upgrade local repository MegaLinter configuration",
},
{
option: "containername",
option: "container-name",
type: "String",
description: "Specify MegaLinter container name",
},
Expand Down
4 changes: 2 additions & 2 deletions mega-linter-runner/lib/runner.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,8 @@ ERROR: Docker engine has not been found on your system.
if (options["remove-container"]) {
commandArgs.push("--rm");
}
if (options.containername) {
commandArgs.push(...["--name", options.containername]);
if (options["container-name"]) {
commandArgs.push(...["--name", options["container-name"]]);
}
commandArgs.push(...["-v", "/var/run/docker.sock:/var/run/docker.sock:rw"]);
commandArgs.push(...["-v", `${lintPath}:/tmp/lint:rw`]);
Expand Down

0 comments on commit 3a9c9ef

Please sign in to comment.