1
0
mirror of https://github.com/google/nomulus synced 2026-01-03 11:45:39 +00:00

Harmonize http status code usage (#2451)

Given that we run servlets, it makes sense to always use the status
code contants from the servlet class.
This commit is contained in:
Lai Jiang
2024-05-24 14:46:37 -04:00
committed by GitHub
parent 0781010b16
commit e88ff77ecb
28 changed files with 157 additions and 175 deletions

View File

@@ -173,23 +173,11 @@ PRESUBMITS = {
):
"JavaScript files should not include console logging.",
PresubmitCheck(
r".*org\.testcontainers\.shaded.*",
r".*\nimport (static )?.*\.shaded\..*",
"java",
{"/node_modules/"},
):
"Do not use shaded dependencies from testcontainers.",
PresubmitCheck(
r".*autovalue\.shaded.*",
"java",
{"/node_modules/"},
):
"Do not use shaded dependencies from autovalue.",
PresubmitCheck(
r".*avro\.shaded.*",
"java",
{"/node_modules/"},
):
"Do not use shaded dependencies from avro.",
"Do not use shaded dependencies",
PresubmitCheck(
r".*com\.google\.common\.truth\.Truth8.*",
"java",
@@ -202,7 +190,12 @@ PRESUBMITS = {
{"/node_modules/", "JpaTransactionManagerImpl.java"},
):
"Do not use java.util.Date. Use classes in java.time package instead.",
PresubmitCheck(
r".*com\.google\.api\.client\.http\.HttpStatusCodes.*",
"java",
{"/node_modules/"},
):
"Use status code from jakarta.servlet.http.HttpServletResponse.",
}
# Note that this regex only works for one kind of Flyway file. If we want to