From 0e871f97dfb4e3b5120cd687950cc26f30ffe46a Mon Sep 17 00:00:00 2001 From: Noah Dietz Date: Tue, 1 Nov 2022 13:52:14 -0700 Subject: [PATCH] feat(AIP-136): disable http-name-variable and http-parent-variable (#1040) Disable the AIP-136 rules `http-name-variable` and `http-parent-variable` after discussion on https://togithub.com/aip-dev/google.aip.dev/issues/955 identified that these rules were insufficient and not tied to specific guidance. Fixes #1023 by disabling it. Note: The rule documentation has a notice that will be highlighted/formatted to stand out. --- docs/rules/0136/http-name-variable.md | 3 +++ docs/rules/0136/http-parent-variable.md | 3 +++ rules/aip0136/aip0136.go | 6 ++++-- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/docs/rules/0136/http-name-variable.md b/docs/rules/0136/http-name-variable.md index 34b80251c..cc008eb11 100644 --- a/docs/rules/0136/http-name-variable.md +++ b/docs/rules/0136/http-name-variable.md @@ -9,6 +9,9 @@ redirect_from: - /0136/http-name-variable --- +**Important:** This rule has been temporarily disabled as it does not match any +AIP guidance. See discussion [here][https://github.com/aip-dev/google.aip.dev/issues/955]. + # Custom methods: HTTP name variable This rule enforces that custom methods only use the `name` variable if the RPC diff --git a/docs/rules/0136/http-parent-variable.md b/docs/rules/0136/http-parent-variable.md index 25d7e6597..5910544c0 100644 --- a/docs/rules/0136/http-parent-variable.md +++ b/docs/rules/0136/http-parent-variable.md @@ -10,6 +10,9 @@ redirect_from: - /0136/http-parent-variable --- +**Important:** This rule has been temporarily disabled as it does not match any +AIP guidance. See discussion [here][https://github.com/aip-dev/google.aip.dev/issues/955]. + # Custom methods: HTTP parent variable This rule enforces that custom methods only use the `parent` variable if the diff --git a/rules/aip0136/aip0136.go b/rules/aip0136/aip0136.go index 5d6f9595a..f6cd025e4 100644 --- a/rules/aip0136/aip0136.go +++ b/rules/aip0136/aip0136.go @@ -30,12 +30,14 @@ func AddRules(r lint.RuleRegistry) error { 136, httpBody, httpMethod, - httpNameVariable, - httpParentVariable, noPrepositions, standardMethodsOnly, uriSuffix, verbNoun, + // These rules are disabled as they have no matching AIP guidance. + // See https://github.com/aip-dev/google.aip.dev/issues/955 for details. + // httpNameVariable, + // httpParentVariable, ) }