Skip to content

Commit 2a9fa16

Browse files
bdovazDaniel Li
andauthored
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]>
1 parent 5a076e0 commit 2a9fa16

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

52 files changed

+569
-61
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"extends": "stylelint-config-standard",
3+
"rules": {
4+
"comment-empty-line-before": [
5+
"always",
6+
{
7+
"severity": "warning"
8+
}
9+
]
10+
}
11+
}

.automation/test/php/php_bad_2.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function takesAnInt(int $i) {
77
return [$i, "hello"];
88
}
99

10-
$data = ["some text", 5];
10+
$data = [ "some text", 5 ];
1111
takesAnInt($data[0]);
1212

1313
$condition = rand(0, 5);
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,13 @@
11
<?php
22

3+
/**
4+
* PHP version 8
5+
*
6+
* @category Template_Class
7+
* @package Template_Class
8+
* @author Author <[email protected]>
9+
* @license https://opensource.org/licenses/MIT MIT License
10+
* @link http://localhost/
11+
*/
12+
313
echo "Hello World!", PHP_EOL;

.automation/test/php/php_good_2.php

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,39 @@
11
<?php
22

33
/**
4-
* @return array<string>
4+
* PHP version 8
5+
*
6+
* @category Template_Class
7+
* @package Template_Class
8+
* @author Author <[email protected]>
9+
* @license https://opensource.org/licenses/MIT MIT License
10+
* @link http://localhost/
11+
*/
12+
13+
/**
14+
* Summary of helloName
15+
* @param string $name test
16+
* @return string[]
517
*/
618
function helloName(string $name): array
719
{
820
return ["hello", $name];
921
}
1022

23+
/**
24+
* Summary of helloMegalinter
25+
* @return void
26+
*/
1127
function helloMegalinter(): void
1228
{
1329
$hello = helloName("MegaLinter");
1430
echo implode(" ", $hello) . PHP_EOL;
1531
}
1632

33+
/**
34+
* Summary of helloOrWorld
35+
* @return void
36+
*/
1737
function helloOrWorld(): void
1838
{
1939
$random = rand(0, 10);

.automation/test/php/phpcs.xml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0"?>
2+
<ruleset xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="PHP_CodeSniffer" xsi:noNamespaceSchemaLocation="phpcs.xsd">
3+
<rule ref="PEAR.Commenting">
4+
<type>error</type>
5+
</rule>
6+
<rule ref="PEAR.Functions">
7+
<type>warning</type>
8+
</rule>
9+
<rule ref="PEAR.WhiteSpace">
10+
<type>warning</type>
11+
</rule>
12+
</ruleset>

.automation/test/spell_vale/.vale.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,5 @@ Packages = Microsoft
66

77
[*]
88
BasedOnStyles = Vale, Microsoft
9+
10+
Vale.Spelling = warning
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
- Correct some broken links in `README` from "Mega-Linter" to "MegaLinter" (#1030)
2-
- Correct some broken links in `README` from "Mega-Linter" to "MegaLinter" (#1030)
3-
- Correct some broken links in `README` from "Mega-Linter" to "MegaLinter" (#1030)
1+
Are you actualy going?
42

5-
This is so advantageous to have an URL !
3+
Are you actualy going?
4+
5+
and and
6+
7+
the the
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
{
2+
"rules": {
3+
"case-sensitive-variables": "warning",
4+
"conditional-begin-end": "error",
5+
"count-star": "error",
6+
"cross-database-transaction": "error",
7+
"data-compression": "error",
8+
"data-type-length": "error",
9+
"delete-where": "error",
10+
"disallow-cursors": "error",
11+
"full-text": "error",
12+
"information-schema": "error",
13+
"keyword-capitalization": "error",
14+
"linked-server": "error",
15+
"multi-table-alias": "error",
16+
"named-constraint": "error",
17+
"non-sargable": "error",
18+
"object-property": "error",
19+
"print-statement": "error",
20+
"schema-qualify": "error",
21+
"select-star": "error",
22+
"semicolon-termination": "error",
23+
"set-ansi": "error",
24+
"set-nocount": "error",
25+
"set-quoted-identifier": "error",
26+
"set-transaction-isolation-level": "error",
27+
"set-variable": "error",
28+
"update-where": "error",
29+
"upper-lower": "error",
30+
"unicode-string": "error"
31+
}
32+
}
Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,5 @@
1-
SELECT;
2-
GO;
1+
DECLARE @VariableName INT,
2+
@SomeOtherVariable INT;
3+
4+
SELECT @variableName = 1;
5+
SELECT @someOtherVariable = 1;
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"Modules":[{"Key":"","Source":"","Dir":"."},{"Key":"module1","Source":"./module","Dir":"module"},{"Key":"module1.module2","Source":"./module","Dir":"module/module"}]}

0 commit comments

Comments
 (0)