@@ -34,6 +34,7 @@ const (
3434 Permissive // permissive
3535 LibraryManagerSubmission // submit
3636 LibraryManagerIndexed // update
37+ LibraryManagerIndexing // ARDUINO_LINT_LIBRARY_MANAGER_INDEXING
3738 Official // ARDUINO_LINT_OFFICIAL
3839 Default // default
3940)
@@ -47,6 +48,7 @@ var Types = map[Type]struct{}{
4748 Permissive : empty ,
4849 LibraryManagerSubmission : empty ,
4950 LibraryManagerIndexed : empty ,
51+ LibraryManagerIndexing : empty ,
5052 Official : empty ,
5153 Default : empty ,
5254}
@@ -66,16 +68,16 @@ func ComplianceModeFromString(complianceModeString string) (bool, bool, bool, er
6668}
6769
6870// LibraryManagerModeFromString parses the --library-manager flag value and returns the corresponding rule mode settings.
69- func LibraryManagerModeFromString (libraryManagerModeString string ) (bool , bool , error ) {
71+ func LibraryManagerModeFromString (libraryManagerModeString string ) (bool , bool , bool , error ) {
7072 switch strings .ToLower (libraryManagerModeString ) {
7173 case LibraryManagerSubmission .String ():
72- return true , false , nil
74+ return true , false , false , nil
7375 case LibraryManagerIndexed .String ():
74- return false , true , nil
76+ return false , true , false , nil
7577 case "false" :
76- return false , false , nil
78+ return false , false , false , nil
7779 default :
78- return false , false , fmt .Errorf ("No matching Library Manager mode for string %s" , libraryManagerModeString )
80+ return false , false , false , fmt .Errorf ("No matching Library Manager mode for string %s" , libraryManagerModeString )
7981 }
8082}
8183
@@ -110,7 +112,7 @@ func Compliance(ruleModes map[Type]bool) string {
110112// LibraryManager returns the string identifier for the Library Manager configuration mode.
111113func LibraryManager (ruleModes map [Type ]bool ) string {
112114 for key , value := range ruleModes {
113- if value && (key == LibraryManagerSubmission || key == LibraryManagerIndexed ) {
115+ if value && (key == LibraryManagerSubmission || key == LibraryManagerIndexed || key == LibraryManagerIndexing ) {
114116 return key .String ()
115117 }
116118 }
0 commit comments