Skip to content

Commit

Permalink
Graduate the Dockerfile linter Hadolint from experimental status.
Browse files Browse the repository at this point in the history
[ci skip-rust]
  • Loading branch information
kaos committed Jan 30, 2022
1 parent 94af9f4 commit a099547
Show file tree
Hide file tree
Showing 5 changed files with 28 additions and 11 deletions.
2 changes: 1 addition & 1 deletion build-support/bin/generate_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,8 +204,8 @@ def run_pants_help_all() -> dict[str, Any]:
"pants.backend.awslambda.python",
"pants.backend.codegen.protobuf.python",
"pants.backend.docker",
"pants.backend.docker.lint.hadolint",
"pants.backend.experimental.codegen.thrift.apache.python",
"pants.backend.experimental.docker.lint.hadolint",
"pants.backend.experimental.go",
"pants.backend.experimental.java",
"pants.backend.experimental.java.lint.google_java_format",
Expand Down
2 changes: 1 addition & 1 deletion pants.toml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ backend_packages.add = [
"pants.backend.shell.lint.shellcheck",
"pants.backend.shell.lint.shfmt",
"pants.backend.docker",
"pants.backend.experimental.docker.lint.hadolint",
"pants.backend.docker.lint.hadolint",
"pants.backend.experimental.go",
"pants.backend.experimental.java",
"pants.backend.experimental.java.lint.google_java_format",
Expand Down
14 changes: 14 additions & 0 deletions src/python/pants/backend/docker/lint/hadolint/register.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Copyright 2022 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

from pants.backend.docker.lint.hadolint import skip_field
from pants.backend.docker.lint.hadolint.rules import rules as hadolint_rules
from pants.backend.docker.rules import rules as docker_rules


def rules():
return (
*docker_rules(),
*hadolint_rules(),
*skip_field.rules(),
)
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# Copyright 2021 Pants project contributors (see CONTRIBUTORS.md).
# Licensed under the Apache License, Version 2.0 (see LICENSE).

from pants.backend.docker.lint.hadolint import skip_field
from pants.backend.docker.lint.hadolint.rules import rules as hadolint_rules
from pants.backend.docker.rules import rules as docker_rules
from pants.backend.docker.lint.hadolint import register
from pants.base.deprecated import deprecated


@deprecated(
"2.11.0.dev0",
(
"The `pants.backend.experimental.docker.lint.hadolint` backend has graduated. Use "
"`pants.backend.docker.lint.hadolint` instead."
),
)
def rules():
return (
*docker_rules(),
*hadolint_rules(),
*skip_field.rules(),
)
return register.rules()
3 changes: 2 additions & 1 deletion src/python/pants/init/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@

python_sources(dependencies=[":plugins"])

# NOTE: When adding a new backend, add it `generate_docs.py` too! (If stable enough for docs)
# NOTE: When adding a new backend, add it to `generate_docs.py` too! (If stable enough for docs)
target(
name="plugins",
dependencies=[
"src/python/pants/backend/awslambda/python",
"src/python/pants/backend/codegen/protobuf/python",
"src/python/pants/backend/docker",
"src/python/pants/backend/docker/lint/hadolint",
"src/python/pants/backend/experimental/codegen/avro/java",
"src/python/pants/backend/experimental/codegen/protobuf/java",
"src/python/pants/backend/experimental/codegen/protobuf/scala",
Expand Down

0 comments on commit a099547

Please sign in to comment.