Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
89 commits
Select commit Hold shift + click to select a range
3bfc649
fix: remove unused comment in workflow script
IShix-g Feb 19, 2025
6f076df
feat: support linting for feature/csharp-lint branch
IShix-g Feb 19, 2025
31af913
feat: switch style violation logs to JSON and improve merging
IShix-g Feb 19, 2025
40a4d03
refactor: simplify SARIF report generation in lint workflow
IShix-g Feb 19, 2025
2ac759a
refactor: simplify jq command in csharp-lint-review workflow
IShix-g Feb 19, 2025
c59f494
feat: add debug step for JSON report generation
IShix-g Feb 19, 2025
5f452ce
feat: add SARIF conversion script and update workflow for StyleCop
IShix-g Feb 19, 2025
4bd231d
feat: integrate reviewdog for StyleCop linting feedback
IShix-g Feb 19, 2025
eb8a530
feat: configure StyleCop and enhance SARIF script usability
IShix-g Feb 19, 2025
c46ca6f
fix: correct script path in csharp-lint-review workflow
IShix-g Feb 19, 2025
e4860f3
feat: add new style rules to stylecop configuration
IShix-g Feb 19, 2025
38397ba
feat: enhance lint review with improved message filtering
IShix-g Feb 19, 2025
07ed31c
feat: include stylecop.json in linting workflow
IShix-g Feb 19, 2025
c70c8f9
feat: update stylecop configuration with disabled rules
IShix-g Feb 19, 2025
4dec5e4
feat: adjust C# lint workflow and simplify .editorconfig
IShix-g Feb 19, 2025
8b99218
feat: validate presence of stylecop.json and update lint rules
IShix-g Feb 19, 2025
8b9da70
feat: enhance lint workflow with build checks per file
IShix-g Feb 19, 2025
2f2be7b
feat: enhance C# linting with custom rules and cleanup workflow
IShix-g Feb 19, 2025
52ca409
feat: improve StyleCop integration in lint workflow
IShix-g Feb 19, 2025
8a6b22c
feat: update workflow to modify TempProject.csproj dynamically
IShix-g Feb 19, 2025
d99fb20
feat: update lint workflow to support StyleCop analyzers
IShix-g Feb 19, 2025
57c3538
feat: update .NET SDK and target framework in lint workflow
IShix-g Feb 19, 2025
4070590
refactor: simplify style violation logging process
IShix-g Feb 19, 2025
6cc8dfb
refactor: update StyleCop settings for rule adjustments
IShix-g Feb 19, 2025
0db5366
feat: enhance style analysis configuration and debugging
IShix-g Feb 19, 2025
bcb6e39
feat: enhance lint workflow with environment variables
IShix-g Feb 19, 2025
ef5102c
fix: correct path to stylecop.json and cleanup unused env vars
IShix-g Feb 19, 2025
3fcac5a
fix: update lint setup and disable analyzer diagnostics
IShix-g Feb 19, 2025
3306f4d
feat: add custom analyzer rules to .editorconfig
IShix-g Feb 19, 2025
3022938
refactor: streamline C# lint workflow by removing redundancies
IShix-g Feb 19, 2025
756962e
feat: enhance linting workflow with StyleCop and new rules
IShix-g Feb 19, 2025
aa8c00e
feat: enhance .editorconfig with detailed coding standards
IShix-g Feb 21, 2025
88f3ef9
feat: handle multiple changed C# files correctly
IShix-g Feb 21, 2025
db253c1
fix: disable warning for camelCase field naming
IShix-g Feb 21, 2025
14b9762
feat: enforce accessibility modifiers in .editorconfig
IShix-g Feb 21, 2025
34bdea1
pref: update accessibility modifier style preference
IShix-g Feb 21, 2025
1986977
pref: adjust SA1308 rule severity to none
IShix-g Feb 21, 2025
a88c1c0
fix: adjust naming rule severity for SA1309
IShix-g Feb 21, 2025
4edffc6
refactor: update variable casing and comment out setting
IShix-g Feb 21, 2025
14f3719
feat: update StyleCop rules in .editorconfig
IShix-g Feb 21, 2025
2c1f469
refactor: simplify style configuration by removing stylecop.json
IShix-g Feb 21, 2025
061ad31
fix: enforce stricter code style rules for fields
IShix-g Feb 21, 2025
62c469d
fix: disable SA1300 naming rule enforcement
IShix-g Feb 21, 2025
3734c89
feat: disable all analyzer diagnostics by default
IShix-g Feb 21, 2025
ca4acad
refactor: update .editorconfig diagnostic rule format
IShix-g Feb 21, 2025
c26e1a4
feat: update .editorconfig with new diagnostic rules
IShix-g Feb 21, 2025
8a6bd9b
refactor: disable warning for missing file header comments
IShix-g Feb 21, 2025
3cf15ec
feat: add severity rules for C# naming conventions
IShix-g Feb 21, 2025
075f425
refactor: reorganize C# field naming rules in .editorconfig
IShix-g Feb 22, 2025
51ceb12
refactor: use 'required_modifiers' instead of 'applicable_modifiers'
IShix-g Feb 22, 2025
44746b3
feat: add Unity C# linter workflows
IShix-g Feb 22, 2025
ff82187
feat: enhance linter workflow with branch detection
IShix-g Feb 22, 2025
991637f
fix: correct syntax issue in reusable-unity-cs-linter workflow
IShix-g Feb 22, 2025
b9d5fa1
refactor: remove outdated Unity-CSharp-Linter workflow
IShix-g Feb 22, 2025
9b2519a
feat: improve workflow efficiency for Unity C# linter
IShix-g Feb 22, 2025
76b0199
feat: improve workflow to ensure .editorconfig validation
IShix-g Feb 22, 2025
ff3cff1
feat: add output for detected changed C# files
IShix-g Feb 22, 2025
8a51932
refactor: streamline Unity C# linter workflow
IShix-g Feb 22, 2025
a30473b
fix: update GitHub Actions output handling and add debug step
IShix-g Feb 22, 2025
6fbdc28
refactor: rename job and remove unused outputs
IShix-g Feb 22, 2025
b0e2e6d
feat: enhance Unity C# linter workflow with head-branch support
IShix-g Feb 22, 2025
4a4f1a4
fix: correct syntax for GitHub Actions conditional check
IShix-g Feb 22, 2025
610b8ea
feat: integrate SARIF conversion script for code analysis
IShix-g Feb 22, 2025
5ccd8fe
feat: conditionally run SARIF script steps
IShix-g Feb 22, 2025
c88e9f9
feat: update default and test linter include paths
IShix-g Feb 23, 2025
d4cb966
fix: add debug output for included files
IShix-g Feb 23, 2025
6e372a3
feat: add debug logs for csproj inspection
IShix-g Feb 23, 2025
0db7f13
fix: correct conditional syntax in GitHub Actions workflow
IShix-g Feb 23, 2025
da60bb9
fix: correct trailing comma handling in file output
IShix-g Feb 23, 2025
110c0c8
feat: enhance linter output readability and cleanup logic
IShix-g Feb 23, 2025
94ebf38
feat: improve Unity C# linter workflow with new features
IShix-g Feb 24, 2025
2da1301
fix: add retries to prevent API timeout in .editorconfig check
IShix-g Feb 24, 2025
05b97ba
feat: enhance Unity CS linter workflow with new inputs
IShix-g Feb 24, 2025
6f29d7d
docs: clarify review-level description in linter workflow
IShix-g Feb 24, 2025
df526d4
refactor: streamline reusable Unity CS linter workflow
IShix-g Feb 24, 2025
3e5f87b
fix: correct key name in Unity CS linter workflow
IShix-g Feb 24, 2025
886e669
refactor: improve naming and logging in linter workflow
IShix-g Feb 24, 2025
725599c
refactor: improve unity linter workflow scripts
IShix-g Feb 24, 2025
b0d524d
fix: correct GitHub API request syntax in linter workflow
IShix-g Feb 24, 2025
c20421d
refactor: simplify GitHub API request in retry logic
IShix-g Feb 24, 2025
147522c
fix: simplify GitHub API call to reduce redundancy
IShix-g Feb 24, 2025
81c9e62
fix: resolve variable assignment issue in linter workflow
IShix-g Feb 24, 2025
c938f98
fix: handle empty file list in unity linter workflow
IShix-g Feb 24, 2025
daede14
fix: filter C# files correctly in git diff
IShix-g Feb 24, 2025
b64a7b4
refactor: simplify file filtering in Unity CS linter workflow
IShix-g Feb 24, 2025
5aa630e
fix: remove premature exit for unchanged C# files
IShix-g Feb 24, 2025
a4f3d03
feat: improve file handling in Unity CS linter workflow
IShix-g Feb 24, 2025
d27161e
docs: clarify branch deletion restriction in workflow input
IShix-g Feb 22, 2025
dc82b99
fix: correct branch existence check in workflow
IShix-g Feb 24, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
394 changes: 338 additions & 56 deletions .editorconfig

Large diffs are not rendered by default.

68 changes: 68 additions & 0 deletions .github/scripts/convert_to_sarif.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import sys
import json
import re

if len(sys.argv) != 3:
print("Usage: python3 convert_to_sarif.py <input_log> <output_sarif>")
sys.exit(1)

input_log_path = sys.argv[1]
output_sarif_path = sys.argv[2]

sarif_data = {
"version": "2.1.0",
"runs": [
{
"tool": {
"driver": {
"name": "StyleCop",
"version": "1.0",
"informationUri": "https://github.com/StyleCop",
"rules": []
}
},
"results": []
}
]
}

log_pattern = re.compile(
r"(?P<file>.+)\((?P<line>\d+),(?P<column>\d+)\): (?P<level>\w+) (?P<rule>\w+): (?P<message>.+)"
)

with open(input_log_path, "r") as log_file:
for line in log_file:
match = log_pattern.search(line)
if match:
file_path = match.group("file")
line_number = int(match.group("line"))
column_number = int(match.group("column"))
level = match.group("level").lower()
rule_id = match.group("rule")

original_message = match.group("message")
message = re.sub(r"\s*\[.+?\]\s*$", "", original_message)

sarif_result = {
"ruleId": rule_id,
"level": level,
"message": {"text": message},
"locations": [
{
"physicalLocation": {
"artifactLocation": {"uri": file_path},
"region": {
"startLine": line_number,
"startColumn": column_number
}
}
}
]
}

sarif_data["runs"][0]["results"].append(sarif_result)

with open(output_sarif_path, "w") as sarif_file:
json.dump(sarif_data, sarif_file, indent=2)

print(f"SARIF file generated: {output_sarif_path}")
108 changes: 0 additions & 108 deletions .github/workflows/csharp-lint-review.yaml

This file was deleted.

4 changes: 2 additions & 2 deletions .github/workflows/reusable-clean-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
workflow_call:
inputs:
branch:
description: 'Branch name to delete. Only deletes branches created by github-actions[bot] and not the default branch.'
description: 'Branch name to delete. Must not be the default branch.'
required: true
type: string
secrets:
Expand Down Expand Up @@ -60,7 +60,7 @@ jobs:

branch="${{ inputs.branch }}"
branch_info=$(gh api /repos/${{ github.repository }}/branches/$branch 2>/dev/null)
if [[ $? -ne 0 ]]; then
if ! my_command; then
echo "::notice::Branch does not exist or failed to fetch branch info for '$branch'."
fi

Expand Down
Loading
Loading