-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add not_respecting_some_naming_conventions.fsx script to detect if some naming conventions are respected. Fixes #93
- Loading branch information
1 parent
bbb6a3c
commit a412e5e
Showing
17 changed files
with
57 additions
and
14 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
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,41 @@ | ||
#!/usr/bin/env -S dotnet fsi | ||
|
||
open System | ||
open System.IO | ||
|
||
#r "nuget: YamlDotNet, Version=13.0.2" | ||
#load "../src/FileConventions/Library.fs" | ||
#load "../src/FileConventions/Helpers.fs" | ||
|
||
let rootDir = Path.Combine(__SOURCE_DIRECTORY__, "..") |> DirectoryInfo | ||
|
||
let invalidYmlFiles = | ||
Helpers.GetInvalidFiles | ||
rootDir | ||
"*.yml" | ||
FileConventions.DetectNotUsingKebabCaseInGitHubCIJobs | ||
|
||
Helpers.AssertNoInvalidFiles | ||
invalidYmlFiles | ||
"Please use kebab-case for CI job names in the following files:" | ||
|
||
let scriptExtensions = | ||
seq { | ||
".fsx" | ||
".bat" | ||
".sh" | ||
} | ||
|
||
let scriptsWithInvalidNames = | ||
scriptExtensions | ||
|> Seq.map(fun extension -> | ||
Helpers.GetInvalidFiles | ||
rootDir | ||
("*" + extension) | ||
FileConventions.DetectNotUsingSnakeCaseInScriptName | ||
) | ||
|> Seq.concat | ||
|
||
Helpers.AssertNoInvalidFiles | ||
scriptsWithInvalidNames | ||
"Please use snake_case for naming the following scripts:" |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.