Skip to content

Commit b0a1d51

Browse files
authored
Ignored Sonar tag-plus-digest Docker warnings (#27220)
Preferring renovates default behaviour and squashing the maintainability warning from Sonar, as having renovate able to maintain these updates for us without noise is better/more maintainable for us in the long run.
1 parent 8ec8482 commit b0a1d51

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

sonar-project.properties

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Ignore SonarCloud rule docker:S8431 ("Use either the version tag or the
2+
# digest for the image instead of both") for all Dockerfiles.
3+
#
4+
# Renovate's default behaviour when pinning Docker images is to keep the
5+
# human-readable tag and append the immutable digest, producing refs of
6+
# the form `image:tag@sha256:...`. This is the format documented by
7+
# Renovate and is what `pinDigest` updates produce out of the box.
8+
#
9+
# SonarCloud's docker:S8431 rule flags that format as a maintainability
10+
# warning. As it's pure maintainability, we want to prefer renovate's
11+
# default behavour to keep automerging working, which is actually more
12+
# maintainable for us.
13+
sonar.issue.ignore.multicriteria=e1
14+
sonar.issue.ignore.multicriteria.e1.ruleKey=docker:S8431
15+
sonar.issue.ignore.multicriteria.e1.resourceKey=**/Dockerfile*

0 commit comments

Comments
 (0)