This repository was archived by the owner on May 4, 2023. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,7 +3,7 @@ import { codigaApiFetch } from "./api";
33import { ACTION_TOKEN_ADD , CODIGA_CONFIG_FILE } from "./constants" ;
44import { getRootDirectory } from "./git" ;
55import { GET_RULESETS_FOR_CLIENT } from "../graphql/queries" ;
6- import { printCommandSuggestion , printFailure } from "./print" ;
6+ import { printCommandSuggestion , printFailure , printSuggestion } from "./print" ;
77
88/**
99 * Gets an array of rulesets and their rules
@@ -39,13 +39,21 @@ export function getRulesetsFromCodigaFile() {
3939
4040 // if there isn't a rulesets value in the codiga.yml file, throw an error
4141 if ( ! parsedFile ) {
42- printFailure ( "No rulesets value found in your `codiga.yml` file" ) ;
42+ printFailure ( "There is no rulesets value in your `codiga.yml` file" ) ;
43+ printSuggestion (
44+ " ↳ Ensure you have a `rulesets:` value in: " ,
45+ codigaFileLocation
46+ ) ;
4347 process . exit ( 1 ) ;
4448 }
4549
4650 // if there aren't any ruleset items under `rulesets:` in the codiga.yml file, throw an error
4751 if ( ! parsedFile . rulesets ) {
48- printFailure ( "No rulesets found in your `codiga.yml` file" ) ;
52+ printFailure ( "There were no rulesets found in your `codiga.yml` file" ) ;
53+ printSuggestion (
54+ " ↳ Ensure you have rulesets listed in: " ,
55+ codigaFileLocation
56+ ) ;
4957 process . exit ( 1 ) ;
5058 }
5159
You can’t perform that action at this time.
0 commit comments