-
-
Notifications
You must be signed in to change notification settings - Fork 250
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Surfacing warnings during successful runs (#4556)
* Warning Feature quick build * wip * wip * [MegaLinter] Apply linters fixes * wip * wip * wip * wip * wip * wip * wip * wip * wip * [MegaLinter] Apply linters fixes * wip * wip --------- Co-authored-by: Daniel Li <[email protected]> Co-authored-by: bdovaz <[email protected]>
- Loading branch information
1 parent
5a076e0
commit 2a9fa16
Showing
52 changed files
with
569 additions
and
61 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ | ||
"extends": "stylelint-config-standard", | ||
"rules": { | ||
"comment-empty-line-before": [ | ||
"always", | ||
{ | ||
"severity": "warning" | ||
} | ||
] | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,13 @@ | ||
<?php | ||
|
||
/** | ||
* PHP version 8 | ||
* | ||
* @category Template_Class | ||
* @package Template_Class | ||
* @author Author <[email protected]> | ||
* @license https://opensource.org/licenses/MIT MIT License | ||
* @link http://localhost/ | ||
*/ | ||
|
||
echo "Hello World!", PHP_EOL; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,39 @@ | ||
<?php | ||
|
||
/** | ||
* @return array<string> | ||
* PHP version 8 | ||
* | ||
* @category Template_Class | ||
* @package Template_Class | ||
* @author Author <[email protected]> | ||
* @license https://opensource.org/licenses/MIT MIT License | ||
* @link http://localhost/ | ||
*/ | ||
|
||
/** | ||
* Summary of helloName | ||
* @param string $name test | ||
* @return string[] | ||
*/ | ||
function helloName(string $name): array | ||
{ | ||
return ["hello", $name]; | ||
} | ||
|
||
/** | ||
* Summary of helloMegalinter | ||
* @return void | ||
*/ | ||
function helloMegalinter(): void | ||
{ | ||
$hello = helloName("MegaLinter"); | ||
echo implode(" ", $hello) . PHP_EOL; | ||
} | ||
|
||
/** | ||
* Summary of helloOrWorld | ||
* @return void | ||
*/ | ||
function helloOrWorld(): void | ||
{ | ||
$random = rand(0, 10); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?xml version="1.0"?> | ||
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd"> | ||
<rule ref="PEAR.Commenting"> | ||
<type>error</type> | ||
</rule> | ||
<rule ref="PEAR.Functions"> | ||
<type>warning</type> | ||
</rule> | ||
<rule ref="PEAR.WhiteSpace"> | ||
<type>warning</type> | ||
</rule> | ||
</ruleset> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,5 @@ Packages = Microsoft | |
|
||
[*] | ||
BasedOnStyles = Vale, Microsoft | ||
|
||
Vale.Spelling = warning |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
- Correct some broken links in `README` from "Mega-Linter" to "MegaLinter" (#1030) | ||
- Correct some broken links in `README` from "Mega-Linter" to "MegaLinter" (#1030) | ||
- Correct some broken links in `README` from "Mega-Linter" to "MegaLinter" (#1030) | ||
Are you actualy going? | ||
|
||
This is so advantageous to have an URL ! | ||
Are you actualy going? | ||
|
||
and and | ||
|
||
the the |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"rules": { | ||
"case-sensitive-variables": "warning", | ||
"conditional-begin-end": "error", | ||
"count-star": "error", | ||
"cross-database-transaction": "error", | ||
"data-compression": "error", | ||
"data-type-length": "error", | ||
"delete-where": "error", | ||
"disallow-cursors": "error", | ||
"full-text": "error", | ||
"information-schema": "error", | ||
"keyword-capitalization": "error", | ||
"linked-server": "error", | ||
"multi-table-alias": "error", | ||
"named-constraint": "error", | ||
"non-sargable": "error", | ||
"object-property": "error", | ||
"print-statement": "error", | ||
"schema-qualify": "error", | ||
"select-star": "error", | ||
"semicolon-termination": "error", | ||
"set-ansi": "error", | ||
"set-nocount": "error", | ||
"set-quoted-identifier": "error", | ||
"set-transaction-isolation-level": "error", | ||
"set-variable": "error", | ||
"update-where": "error", | ||
"upper-lower": "error", | ||
"unicode-string": "error" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,5 @@ | ||
SELECT; | ||
GO; | ||
DECLARE @VariableName INT, | ||
@SomeOtherVariable INT; | ||
|
||
SELECT @variableName = 1; | ||
SELECT @someOtherVariable = 1; |
1 change: 1 addition & 0 deletions
1
.automation/test/terraform_tflint/bad/nested_module_vars/.terraform/modules/modules.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Modules":[{"Key":"","Source":"","Dir":"."},{"Key":"module1","Source":"./module","Dir":"module"},{"Key":"module1.module2","Source":"./module","Dir":"module/module"}]} |
6 changes: 6 additions & 0 deletions
6
.automation/test/terraform_tflint/bad/nested_module_vars/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
module "module1" { | ||
source = "./module" | ||
|
||
foo = "foo" | ||
bar = "bar" | ||
} |
11 changes: 11 additions & 0 deletions
11
.automation/test/terraform_tflint/bad/nested_module_vars/module/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
variable "foo" {} | ||
variable "bar" {} | ||
variable "baz" {} | ||
|
||
module "module2" { | ||
source = "./module" | ||
|
||
red = "${var.foo}-${var.bar}" | ||
blue = "blue" | ||
green = "${var.foo}-${var.baz}-${path.module}" | ||
} |
4 changes: 4 additions & 0 deletions
4
.automation/test/terraform_tflint/bad/nested_module_vars/module/module/main.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
variable "red" {} | ||
variable "blue" {} | ||
variable "green" {} | ||
variable "yellow" {} |
13 changes: 13 additions & 0 deletions
13
...m_tflint/bad/nested_modules/.terraform/modules/07be448a6067a2bba065bff4beea229d/module.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
variable "override" { | ||
default = "baz" | ||
} | ||
variable "no_default" {} | ||
variable "unknown" {} | ||
|
||
module "test" { | ||
source = "./module1" | ||
|
||
override = "${var.override}" | ||
no_default = "${var.no_default}" | ||
unknown = "${var.unknown}" | ||
} |
15 changes: 15 additions & 0 deletions
15
...ad/nested_modules/.terraform/modules/07be448a6067a2bba065bff4beea229d/module1/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
variable "override" { | ||
default = "baz" | ||
} | ||
variable "no_default" {} | ||
variable "unknown" {} | ||
|
||
resource "aws_instance" "web" { | ||
ami = "ami-b73b63a0" | ||
instance_type = "t1.2xlarge" | ||
|
||
tags { | ||
Name = "HelloWorld" | ||
} | ||
} | ||
|
15 changes: 15 additions & 0 deletions
15
...tflint/bad/nested_modules/.terraform/modules/a8d8930bc3c2ae53bf6e3bbcb3083d7b/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
variable "override" { | ||
default = "baz" | ||
} | ||
variable "no_default" {} | ||
variable "unknown" {} | ||
|
||
resource "aws_instance" "web" { | ||
ami = "ami-b73b63a0" | ||
instance_type = "t1.2xlarge" | ||
|
||
tags { | ||
Name = "HelloWorld" | ||
} | ||
} | ||
|
1 change: 1 addition & 0 deletions
1
.automation/test/terraform_tflint/bad/nested_modules/.terraform/modules/modules.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{"Modules":[{"Key":"root","Source":"./module","Dir":"module"},{"Key":"root.test","Source":"./module1","Dir":"module/module1"},{"Key":"1.root;./module","Source":"./module","Dir":".terraform/modules/07be448a6067a2bba065bff4beea229d"},{"Key":"1.root;./module|test;./module1","Source":"./module1","Dir":".terraform/modules/a8d8930bc3c2ae53bf6e3bbcb3083d7b"},{"Key":"","Source":"","Dir":"."}]} |
7 changes: 7 additions & 0 deletions
7
.automation/test/terraform_tflint/bad/nested_modules/module.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
module "root" { | ||
source = "./module" | ||
|
||
override = "foo" | ||
no_default = "bar" | ||
unknown = "${data.aws.ami.id}" | ||
} |
13 changes: 13 additions & 0 deletions
13
.automation/test/terraform_tflint/bad/nested_modules/module/module.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
variable "override" { | ||
default = "baz" | ||
} | ||
variable "no_default" {} | ||
variable "unknown" {} | ||
|
||
module "test" { | ||
source = "./module1" | ||
|
||
override = "${var.override}" | ||
no_default = "${var.no_default}" | ||
unknown = "${var.unknown}" | ||
} |
24 changes: 24 additions & 0 deletions
24
.automation/test/terraform_tflint/bad/nested_modules/module/module1/resource.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
variable "override" { | ||
default = "baz" | ||
} | ||
variable "no_default" {} | ||
variable "unknown" {} | ||
|
||
resource "aws_instance" "web" { | ||
ami = "ami-b73b63a0" | ||
instance_type = "t1.2xlarge" | ||
|
||
tags { | ||
Name = "HelloWorld" | ||
} | ||
} | ||
|
||
resource "aws_instance" "web2" { | ||
ami = "ami-b73b63a1" | ||
instance_type = "t1.2xlarge" | ||
|
||
tags { | ||
Name = "HelloWorld2" | ||
} | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
terraform { | ||
required_version = ">= 1.8.5" | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 5.55.0" # https://registry.terraform.io/providers/hashicorp/aws/latest | ||
} | ||
} | ||
} | ||
|
||
provider "template" {} | ||
|
||
provider "aws" { | ||
region = "us-west-2" | ||
} | ||
|
||
resource "aws_s3_bucket" "example" { | ||
bucket = "my-tf-test-bucket-${random_id.bucket_suffix.hex}" | ||
} |
28 changes: 28 additions & 0 deletions
28
.automation/test/terraform_tflint/good/terraform_good_1.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
terraform { | ||
required_version = ">= 1.8.5" | ||
required_providers { | ||
aws = { | ||
source = "hashicorp/aws" | ||
version = ">= 5.55.0" # https://registry.terraform.io/providers/hashicorp/aws/latest | ||
} | ||
} | ||
} | ||
|
||
provider "aws" { | ||
region = "us-west-2" | ||
} | ||
|
||
resource "aws_s3_bucket" "example" { | ||
bucket = "my-tf-test-bucket-${random_id.bucket_suffix.hex}" | ||
} | ||
|
||
resource "aws_s3_bucket_versioning" "example" { | ||
bucket = aws_s3_bucket.example.id | ||
versioning_configuration { | ||
status = "Enabled" | ||
} | ||
} | ||
|
||
resource "random_id" "bucket_suffix" { | ||
byte_length = 4 | ||
} |
34 changes: 34 additions & 0 deletions
34
.automation/test/terraform_tflint/good/terraform_good_2.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
terraform { | ||
required_version = ">= 1.8.5" | ||
required_providers { | ||
azurerm = { | ||
source = "hashicorp/azurerm" | ||
version = ">= 3.109.0" # https://registry.terraform.io/providers/hashicorp/azurerm/latest | ||
} | ||
} | ||
} | ||
|
||
provider "azurerm" { | ||
features {} | ||
} | ||
|
||
resource "azurerm_resource_group" "example" { | ||
name = "example-resources" | ||
location = "East US" | ||
} | ||
|
||
resource "azurerm_storage_account" "example" { | ||
name = "storageacc${random_id.suffix.hex}" | ||
resource_group_name = azurerm_resource_group.example.name | ||
location = azurerm_resource_group.example.location | ||
account_tier = "Standard" | ||
account_replication_type = "GRS" | ||
|
||
tags = { | ||
environment = "staging" | ||
} | ||
} | ||
|
||
resource "random_id" "suffix" { | ||
byte_length = 8 | ||
} |
30 changes: 30 additions & 0 deletions
30
.automation/test/terraform_tflint/good/terraform_good_3.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
terraform { | ||
required_version = ">= 1.8.5" | ||
required_providers { | ||
google = { | ||
source = "hashicorp/google" | ||
version = ">= 5.34.0" # https://registry.terraform.io/providers/hashicorp/google/latest | ||
} | ||
} | ||
} | ||
|
||
provider "google" { | ||
project = "my-project-id" | ||
region = "us-central1" | ||
} | ||
|
||
resource "google_storage_bucket" "example" { | ||
name = "my-bucket-${random_id.suffix.hex}" | ||
location = "US" | ||
force_destroy = true | ||
|
||
uniform_bucket_level_access = true | ||
|
||
versioning { | ||
enabled = true | ||
} | ||
} | ||
|
||
resource "random_id" "suffix" { | ||
byte_length = 4 | ||
} |
Oops, something went wrong.