feat: tweak rules (#1608)

This commit is contained in:
Richard Gomez authored and GitHub committed 2024-10-29 01:47:12 -05:00
1 parent 43fae355e6
commit 5c2e8132f2
8 files changed
+188 -139

No files matched your search

+1 -1
View File
@@ -82,7 +82,7 @@ func CreateGlobalConfig() config.Config {
regexp.MustCompile(`(^|/)npm-shrinkwrap\.json$`),
regexp.MustCompile(`(^|/)bower_components/.*?$`),
// TODO: Add more common static assets, such as swagger-ui.
regexp.MustCompile(`(^|/)(jquery(-?ui)?|swagger-?ui)[a-zA-Z0-9.-]+\.js(\.map)?$`),
regexp.MustCompile(`(^|/)(angular|jquery(-?ui)?|plotly|swagger-?ui)[a-zA-Z0-9.-]+(\.min)?\.js(\.map)?$`),
// ----------- Python files -----------
// Dependencies and lock files.
+2
View File
@@ -91,8 +91,10 @@ func TestConfigAllowlistPaths(t *testing.T) {
}{
"javascript - common static assets": {
invalid: []string{
`src/main/static/lib/angular.1.2.16.min.js`,
`src/main/resources/static/jquery-ui-1.12.1/jquery-ui-min.js`,
`src/main/resources/static/js/jquery-ui-1.10.4.min.js`,
`src-static/js/plotly.min.js`,
`swagger/swaggerui/swagger-ui-bundle.js.map`,
`swagger/swaggerui/swagger-ui-es-bundle.js.map`,
`src/main/static/swagger-ui.min.js`,