Skip to content
This repository was archived by the owner on Jul 21, 2025. It is now read-only.

Commit a3eaac2

Browse files
Update GlobalConfiguration to return non-nullable type and add configuration section to README
1 parent 15d3941 commit a3eaac2

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,26 @@ https://github.com/EmilZackrisson/RepositoryLinter
6363
/tmp/repolinter/RepositoryLinter
6464
```
6565

66+
## Configuration
67+
The program can be configured using a yaml and the --config flag. This is optional and the program will use the default configuration if no configuration is provided.
68+
69+
```yaml
70+
Checks:
71+
- Name: "License Exists" # Name of the check. (See https://github.com/EmilZackrisson/RepositoryLinter/blob/main/RepositoryLinter/LintRunner.cs)
72+
AllowedToFail: false # Default
73+
74+
# Path to save the git repositories to. Default is a temp directory.
75+
PathToSaveGitRepos: "~/RepositoryLinter"
76+
77+
# Truncate the output of each check to 10 lines. Default is true.
78+
TruncateOutput: true # Default
79+
80+
# Clean up the cloned repositories after the program has finished. Default is true.
81+
CleanUp: true # Default
82+
```
83+
84+
85+
6686
## Run tests
6787
6888
The unit tests are using the [xUnit](https://xunit.net/) framework.

RepositoryLinter/GlobalConfiguration.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public class GlobalConfiguration
2929

3030
public List<CheckerConfiguration> Checks { get; set; } = new();
3131

32-
public static GlobalConfiguration? ReadConfiguration(string path)
32+
public static GlobalConfiguration ReadConfiguration(string path)
3333
{
3434
var deserializer = new DeserializerBuilder()
3535
.IgnoreUnmatchedProperties()

0 commit comments

Comments
 (0)