Skip to content

move AZS005, AZS006, AZS008, AZR005 into the AZP category as AZP002-AZP005 - #48

Merged
katbyte merged 2 commits into
mainfrom
kt/azp-moves
Sep 25, 2026
Merged

katbyte merged 2 commits into
mainfrom
kt/azp-moves

Conversation

@katbyte

@katbyte katbyte commented Sep 10, 2026 •

Copy link
Copy Markdown
Owner

Breaking. Moves four rules into the AZP category (added in #47): AZS005→AZP002, AZS006→AZP003, AZS008→AZP004, AZR005→AZP005.

Why: AZS rules are about one schema and AZR rules about one resource. These four check the provider as a whole: every resource has a data source, each data source exposes its resource's properties, the registration lists are sorted, and a provider-wide feature flag stays unset. That is what AZP is for. Renaming gets more expensive with every //azignore: comment written against the old names, so it should ship before azurerm next upgrades.

The rules move, the checks don't change. The folders were moved with git mv. The rule names, flag prefixes, URLs, test packages and READMEs now use the new names. The AZP section now sits under AZG in the README.

-| [AZS005](checks/AZS/AZS005_resource_missing_data_source) | registered resources must have a same-named data source |
+| [AZP002](checks/AZP/AZP002_resource_missing_data_source) | registered resources must have a same-named data source |

Old names that main added after this PR was first written. #49 added a second AZS005 test package, an //azignore:AZS006 in an AZS006 test file, and an "as in AZS005" in a README. The test package would have been left behind in the old folder. With the old name still in place, the ignore comment stopped working, so TestAZP003 failed. All three now use the new names.

-	s["internal_id"] = &pluginsdk.Schema{Type: pluginsdk.TypeString, Optional: true} // azignore:AZS006
+	s["internal_id"] = &pluginsdk.Schema{Type: pluginsdk.TypeString, Optional: true} // azignore:AZP003
-	analysistest.Run(t, filepath.Join(filepath.Dir(filename), "testdata"), Analyzer, "azs005", "azs005unresolved")
+	analysistest.Run(t, filepath.Join(filepath.Dir(filename), "testdata"), Analyzer, "azp002", "azp002unresolved")

What azurerm has to change. azurerm is pinned to v0.8.0. Its .golangci.yml turns off AZS005 and AZS006 by name, and it has four //azignore:AZS006 comments (servicebus queue and topic, signalr, traffic manager). The plugin rejects rule names it doesn't know, so the upgrade fails loudly until those six lines are renamed. The rules can't quietly turn back on.

Things that are fine as they are.

  • The other rules were checked against the same test. None of them judges the provider as a whole, including AZG009 (added since): it is plain Go style.
  • AZR004 (resource IDs compared with ==) is the closest call. It is about resource IDs, so it stays in AZR.
  • Older CHANGELOG entries keep the old names, since they describe past releases.

Tests and lint pass on top of main.

@katbyte
katbyte changed the base branch from kt/azp001-docs-url-locale to main September 24, 2026 23:21
@katbyte
katbyte merged commit 9aaed0c into main Sep 25, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant