Skip to content

Commit d4a6ea6

Browse files
committed
project-standards comments
1 parent 5923ae5 commit d4a6ea6

File tree

1 file changed

+32
-13
lines changed

1 file changed

+32
-13
lines changed

.yamato/project-standards.yml

Lines changed: 32 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,32 @@
1-
{% metadata_file .yamato/project.metafile %}
1+
{% metadata_file .yamato/project.metafile %} # All configuration that is used to create different configurations (used in for loops) is taken from this file.
22
---
33

4-
# Project standards are being checked for package (in project context).
5-
# It should be enough to perform the test on default project (testproject) but to make sure that all projects conform to our standards job for each of them will be available.
6-
# Tests are executed for default editor (trunk) on default platform (ubuntu) as in project.metafile declaration since results would be the same across editors and platforms.
4+
# DESCRIPTION--------------------------------------------------------------------------
5+
# This job is responsible for validating project compliance with NGO coding standards and conventions
6+
# Standards validation includes:
7+
# Code formatting compliance
8+
# Project structure validation
9+
# Coding convention adherence
10+
# Solution file synchronization
11+
12+
# CONFIGURATION STRUCTURE--------------------------------------------------------------
13+
# Jobs configurations are generated using nested loops through:
14+
# 1. For all NGO projects (testproject, testproject-tools-interation, minimalproject)
15+
# 2. For default platform only (Ubuntu) since standards would not vary between platforms (no need for checks on more platforms)
16+
# 3. For default editor version (trunk) since standards would not vary between editors (no need for checks on more editors)
17+
18+
# TECHNICAL CONSTRAINTS---------------------------------------------------------------
19+
# Requires .NET SDK installed (should be preinstalled on the image so we just check for version)
20+
# Needs Unity Editor for solution synchronization
21+
# Uses custom standards validation tool (netcode.standards)
22+
# Generates no test artifacts (pass/fail only). Eventual failure will be visible in the logs
23+
24+
# QUALITY THOUGHTS--------------------------------------------------------------------
25+
# While testproject validation would be sufficient, since it validates both project and package (where package is our main concern) jobs for all projects are being generated to ensure that we conform to quality standards in all projects.
26+
# To see where this job is included (in trigger job definitions) look into _triggers.yml file
27+
28+
#------------------------------------------------------------------------------------
29+
730
{% for project in projects.all -%}
831
{% for platform in test_platforms.default -%}
932
{% for editor in validation_editors.all -%}
@@ -14,17 +37,13 @@ standards_{{ platform.name }}_{{ project.name }}_{{ editor }}:
1437
image: {{ platform.image }}
1538
flavor: {{ platform.flavor }}
1639
commands:
17-
# .NET environment setup
40+
# .NET environment setup. Ensures required .NET SDK and formatting tools are available
1841
- dotnet --version
1942
- dotnet format --version
20-
21-
# Unity setup
22-
- pip install unity-downloader-cli --upgrade --index-url https://artifactory.prd.it.unity3d.com/artifactory/api/pypi/pypi/simple
23-
- unity-downloader-cli -u {{ editor }} -c editor --wait --fast
24-
- .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit
25-
26-
# Standards check
27-
- dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check
43+
44+
- unity-downloader-cli -u {{ editor }} -c editor # Downloads basic editor
45+
- .Editor/Unity -batchmode -nographics -logFile - -executeMethod Packages.Rider.Editor.RiderScriptEditor.SyncSolution -projectPath {{ project.path }} -quit # This command is used to invoke Unity in a "headless" mode. It's used to sync the project
46+
- dotnet run --project=dotnet-tools/netcode.standards -- --project={{ project.path }} --check # Runs standards check
2847
{% endfor -%}
2948
{% endfor -%}
3049
{% endfor -%}

0 commit comments

Comments
 (0)