@@ -25,46 +25,50 @@ public static final class RuleViolationTemplates {
2525 // Second %s is the name of a class or interface.
2626 public static final String UNIMPLEMENTED_TYPE_RULE = "Extend, implement, or delete %s %s" ;
2727 public static final String LIMIT_REACHED_VIOLATION_MESSAGE =
28- "%s. The analysis preemptively stopped running on this path to prevent an OutOfMemory error. Rerun Graph Engine targeting this entry method with a larger heap space." ;
28+ "%s. The analysis preemptively stopped running on this path to prevent an OutOfMemory error. Rerun Graph Engine and target this entry method with a larger heap space." ;
2929 }
3030
3131 /** Main args and process checks * */
32- public static final String REQUIRES_AT_LEAST_ONE_ARGUMENT =
33- "SFGE invocation requires at least one argument." ;
34-
35- public static final String UNRECOGNIZED_ACTION = "Unrecognized action to invoke SFGE: %s." ;
36- public static final String INCORRECT_ARGUMENT_COUNT =
37- "Wrong number of arguments. Expected %d; received %d" ;
32+ public static final class InvocationErrors {
33+ public static final String REQUIRES_AT_LEAST_ONE_ARGUMENT =
34+ "SFGE invocation requires at least one argument." ;
35+ public static final String UNRECOGNIZED_ACTION = "Unrecognized action to invoke SFGE: %s." ;
36+ public static final String INCORRECT_ARGUMENT_COUNT =
37+ "Wrong number of arguments. Expected %d; received %d" ;
38+ }
3839
3940 /** UserActionException * */
41+ public static final class UserActionMessage {
42+ // format: filename,defined type, line number
43+ public static final String UNREACHABLE_CODE =
44+ "Remove unreachable code to proceed with the analysis: %s,%s:%d" ;
45+ public static final String VARIABLE_DECLARED_MULTIPLE_TIMES =
46+ "Rename or delete this reused variable to proceed with the analysis: %s,%s:%d" ;
47+ }
4048
41- // format: filename,defined type, line number
42- public static final String UNREACHABLE_CODE =
43- "Remove unreachable code to proceed with the analysis: %s,%s:%d" ;
44-
45- public static final String VARIABLE_DECLARED_MULTIPLE_TIMES =
46- "This variable is reused. Rename or delete it to proceed with the analysis: %s,%s:%d" ;
47-
48- public static final String INSUFFICIENT_HEAP_SPACE =
49- "There's insufficient heap space (%d bytes) to execute Graph Engine. Increase heap space using --sfgejvmargs option and retry." ;
50-
51- public static final String STRIP_INACCESSIBLE_READ_WARNING_TEMPLATE =
52- "For stripInaccessible checks on READ operation, Salesforce Graph Engine can't verify that only sanitized data is used after the check. Discard unsanitized data for [%2$s]." ;
53-
54- public static final String UNRESOLVED_CRUD_FLS_TEMPLATE =
55- "Salesforce Graph Engine couldn't resolve the parameter passed to [%2$s] operation%4$s. Confirm that this operation has the necessary %1$s checks." ;
56-
57- public static final String FIELDS_MESSAGE_TEMPLATE = " with field(s) [%s]" ;
58- public static final String FIELD_HANDLING_NOTICE =
59- ". Confirm that the objects and fields involved in these segments have FLS checks: [%s]" ;
49+ public static final class PathExpansionTemplates {
50+ public static final String INSUFFICIENT_HEAP_SPACE =
51+ "There's insufficient heap space (%d bytes) to execute Graph Engine. Increase heap space using the --sfgejvmargs option and retry." ;
52+ public static final String PATH_EXPANSION_LIMIT_REACHED =
53+ "Graph Engine reached the path expansion upper limit (%d)." ;
54+ }
6055
61- public static final String INVALID_SYNTAX_TEMPLATE = "Invalid syntax at %d:%d. (%s)" ;
56+ public static final class CrudFlsTemplates {
6257
63- public static final String FIX_COMPILATION_ERRORS =
64- "Graph engine encountered compilation errors. Fix the errors in %s and retry." ;
58+ public static final String STRIP_INACCESSIBLE_READ_WARNING_TEMPLATE =
59+ "For stripInaccessible checks on READ operation, Salesforce Graph Engine can't verify that only sanitized data is used after the check. Discard unsanitized data for [%2$s]." ;
60+ public static final String UNRESOLVED_CRUD_FLS_TEMPLATE =
61+ "Salesforce Graph Engine couldn't resolve the parameter passed to [%2$s] operation%4$s. Confirm that this operation has the necessary %1$s checks." ;
62+ public static final String FIELDS_MESSAGE_TEMPLATE = " with field(s) [%s]" ;
63+ public static final String FIELD_HANDLING_NOTICE =
64+ ". Confirm that the objects and fields involved in these segments have FLS checks: [%s]" ;
65+ }
6566
66- public static final String EXCEPTION_FORMAT_TEMPLATE = "%s, Caused by: \n %s" ;
67+ public static final class CompilationErrors {
6768
68- public static final String PATH_EXPANSION_LIMIT_REACHED =
69- "Graph Engine reached the path expansion upper limit (%d)." ;
69+ public static final String INVALID_SYNTAX_TEMPLATE = "Invalid syntax at %d:%d. (%s)" ;
70+ public static final String FIX_COMPILATION_ERRORS =
71+ "Graph engine encountered compilation errors. Fix the errors in %s and retry." ;
72+ public static final String EXCEPTION_FORMAT_TEMPLATE = "%s, Caused by:\n %s" ;
73+ }
7074}
0 commit comments