Skip to content

Commit

Permalink
Merge branch 'master' into query/issues5115_5116_5118
Browse files Browse the repository at this point in the history
  • Loading branch information
cxMiguelSilva committed Sep 26, 2022
2 parents cac3d02 + 9eeb00b commit bd52af4
Show file tree
Hide file tree
Showing 2,898 changed files with 38,645 additions and 12,070 deletions.
6 changes: 3 additions & 3 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,15 @@ examples
.editorconfig
.gitignore
.golangci.yml
.goreleaser.nightly.yml
.goreleaser.yml
release/.goreleaser.nightly.yml
release/.goreleaser.yml
cx.configuration
docker-compose.yml
mkdocs.yml
sonar-project.properties
*.sarif
*.zip
Dockerfile
Dockerfile.*
docker
assets/queries/**/test
assets/template
10 changes: 9 additions & 1 deletion .github/scripts/metrics/get_metrics.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,27 +11,35 @@
'azureresourcemanager': os.path.join(queries_basepath, 'azureResourceManager', '*'),
'cloudformation': os.path.join(queries_basepath, 'cloudFormation', '**', '*'),
'openapi': os.path.join(queries_basepath, 'openAPI', '**', '*'),
'crossplane': os.path.join(queries_basepath, 'crossplane',"**" ,'*'),
'k8s': os.path.join(queries_basepath, 'k8s', '*'),
'knative': os.path.join(queries_basepath, 'knative', '*'),
'common': os.path.join(queries_basepath, 'common', '*'),
'dockerfile': os.path.join(queries_basepath, 'dockerfile', '*'),
'terraform': os.path.join(queries_basepath, 'terraform', '**', '*'),
'grpc': os.path.join(queries_basepath, 'grpc', '*'),
'gdm': os.path.join(queries_basepath, 'googleDeploymentManager', '*'),
'dockerCompose': os.path.join(queries_basepath, 'dockerCompose', '*'),
'pulumi': os.path.join(queries_basepath, 'pulumi', "**", '*'),
'serverlessFW': os.path.join(queries_basepath, 'serverlessFW', '*'),

}
samples_ext = {
'azureresourcemanager': ['json'],
'cloudformation': ['yaml', 'json'],
'crossplane': ['yaml'],
'openapi': ['yaml', 'json'],
'ansible': ['yaml'],
'knative': ['yaml'],
'k8s': ['yaml'],
'common': ['yaml', 'json', 'dockerfile', 'tf'],
'dockerfile': ['dockerfile'],
'terraform': ['tf'],
'grpc': ['proto'],
'gdm': ['yaml'],
'dockerCompose': ['dockerCompose'],

'pulumi': ['yaml'],
"serverlessFW": ['yaml'],
}
summary = {
'total': 0,
Expand Down
6 changes: 5 additions & 1 deletion .github/scripts/queries-validator/metadata-schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,14 +86,18 @@
"AzureResourceManager",
"Buildah",
"CloudFormation",
"Crossplane",
"Common",
"Dockerfile",
"DockerCompose",
"GRPC",
"GoogleDeploymentManager",
"Knative",
"Kubernetes",
"ServerlessFW",
"OpenAPI",
"Terraform"
"Terraform",
"Pulumi"
]
},
"descriptionID": {
Expand Down
2 changes: 2 additions & 0 deletions .github/scripts/report/e2e-html.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ func includeCSS(name string) template.HTML {
if err != nil {
return ""
}
/* #nosec */
return template.HTML("<style>" + cssMinified + "</style>") //nolint
}

Expand All @@ -61,6 +62,7 @@ func includeJS(name string) template.HTML {
if err != nil {
return ""
}
/* #nosec */
return template.HTML("<script>" + jsMinified + "</script>") //nolint
}

Expand Down
10 changes: 7 additions & 3 deletions .github/scripts/report/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func main() {
flag.Parse()

// Read TestLog (NDJSON)
jsonTestsOutput, err := os.Open(filepath.Join(filepath.ToSlash(testPath), testName))
jsonTestsOutput, err := os.Open(filepath.Clean(filepath.Join(filepath.ToSlash(testPath), testName)))
if err != nil {
fmt.Printf("Error when trying to open: %v\n", filepath.Join(filepath.ToSlash(testPath), testName))
os.Exit(1)
Expand Down Expand Up @@ -112,7 +112,7 @@ func main() {

// Parse Output from Failed Tests
if hasFailures {
jsonTestsOutputClean, err := os.Open(filepath.Join(filepath.ToSlash(testPath), testName))
jsonTestsOutputClean, err := os.Open(filepath.Clean(filepath.Join(filepath.ToSlash(testPath), testName)))
if err != nil {
fmt.Printf("Error when trying to open: %v\n", filepath.Join(filepath.ToSlash(testPath), testName))
os.Exit(1)
Expand All @@ -121,7 +121,11 @@ func main() {
decoder2 := json.NewDecoder(jsonTestsOutputClean)
for decoder2.More() {
var log TestLog
decoder2.Decode(&log)
errDecoder := decoder2.Decode(&log)
if errDecoder != nil {
fmt.Printf("Error when decoding: %w\n", log)
os.Exit(1)
}

if log.Action != "output" {
continue
Expand Down
16 changes: 16 additions & 0 deletions .github/scripts/samples-linters/.tflint.hcl
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
rule "terraform_required_providers" {
enabled = false
}

rule "terraform_unused_declarations" {
enabled = false
}

rule "terraform_typed_variables" {
enabled = false
}

rule "terraform_deprecated_index" {
enabled = false
}

Loading

0 comments on commit bd52af4

Please sign in to comment.