@@ -3,7 +3,12 @@ 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 , printSuggestion } from "./print" ;
6+ import {
7+ printCommandSuggestion ,
8+ printFailure ,
9+ printInfo ,
10+ printSuggestion ,
11+ } from "./print" ;
712
813/**
914 * Gets an array of rulesets and their rules
@@ -39,21 +44,31 @@ export function getRulesetsFromCodigaFile() {
3944
4045 // if there isn't a rulesets value in the codiga.yml file, throw an error
4146 if ( ! parsedFile ) {
42- printFailure ( "There is no rulesets value in your `codiga.yml` file " ) ;
47+ printFailure ( "We couldn't find a ` rulesets` value to get rulesets from " ) ;
4348 printSuggestion (
4449 " ↳ Ensure you have a `rulesets:` value in: " ,
4550 codigaFileLocation
4651 ) ;
52+ printSuggestion (
53+ " ↳ You can search for rulesets here:" ,
54+ "https://app.codiga.io/hub/rulesets"
55+ ) ;
4756 process . exit ( 1 ) ;
4857 }
4958
5059 // if there aren't any ruleset items under `rulesets:` in the codiga.yml file, throw an error
5160 if ( ! parsedFile . rulesets ) {
52- printFailure ( "There were no rulesets found in your `codiga.yml` file" ) ;
61+ printFailure (
62+ "We can't look for violations is there are no rulesets listed in your `codiga.yml` file"
63+ ) ;
5364 printSuggestion (
5465 " ↳ Ensure you have rulesets listed in: " ,
5566 codigaFileLocation
5667 ) ;
68+ printSuggestion (
69+ " ↳ You can search for more rulesets here:" ,
70+ "https://app.codiga.io/hub/rulesets"
71+ ) ;
5772 process . exit ( 1 ) ;
5873 }
5974
0 commit comments