Skip to content

Commit 1b67bff

Browse files
rishipalcopybara-github
authored andcommitted
Define a new field in the conformance config proto format which will specify the behavior of the non-allowlisted conformance violations when running via CheckJS.
This will allow us to distinguish between: 1. Global conformance (go/jscp): These are (and will continue to be) build breaking when non-allowlisted. 2. Boq conformance: These conformance requirements will be non-build breaking (at the CheckJS level) even when non-allowlisted. Noted in "Implementation Steps" section of go/supporting-library-level-js-conformance-dd PiperOrigin-RevId: 743324807
1 parent 625f8a8 commit 1b67bff

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

src/com/google/javascript/jscomp/conformance/conformance.proto

+34
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,40 @@ option java_multiple_files = true;
2121
// A container to describe code requirements
2222
message ConformanceConfig {
2323
repeated Requirement requirement = 1;
24+
25+
/**
26+
* Represents the behavior of all the non-allowlisted conformance violations
27+
* when this conformance config gets passed in to JSCompiler during a CheckJS
28+
* action. The allowlisted violations are always recorded.
29+
*/
30+
enum LibraryLevelNonAllowlistedConformanceViolationsBehavior {
31+
/**
32+
* The default behavior. Most of conformance configs (i.e. all non-BoqWeb
33+
* and non-global configs) will not have the
34+
* `library_level_conformance_behavior` field set, and will not get fed-in
35+
* into the CheckJS action.
36+
*/
37+
UNSPECIFIED = 0;
38+
39+
/**
40+
* The behavior used by global conformance configs (go/jscp) where any
41+
* non-allowlisted violation will break the library level build.
42+
*/
43+
REPORT_AS_BUILD_ERROR = 1;
44+
45+
/**
46+
* The behavior used by non-global conformance configs (initially only
47+
* BoqWeb) where any non-allowlisted violation will not break the library
48+
* level build but only get recorded in its conformance report (i.e.
49+
* JsCompilerPerLibraryConformanceReport). This will be used by the "curated
50+
* set" of non-breaking conformance configs (initially only Boq web) as per
51+
* go/supporting-library-level-js-conformance-dd.
52+
*/
53+
RECORD_ONLY = 2;
54+
}
55+
56+
optional LibraryLevelNonAllowlistedConformanceViolationsBehavior
57+
library_level_non_allowlisted_conformance_violations_behavior = 2;
2458
}
2559

2660
// A specification of code requirements

0 commit comments

Comments
 (0)