chore: modernize CI and update Go toolchain

- Bump Go from 1.19 to 1.26 and update all dependencies
- Rewrite CI workflow with matrix strategy (Linux, macOS, Windows)
- Update GitHub Actions to current versions (checkout@v4, setup-go@v5)
- Update CodeQL actions from v1 to v3
- Fix cross-platform bug in mock/path.go (path.Join -> filepath.Join)
- Clean up dependabot config (weekly schedule, remove stale ignore)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Christopher Allen Lane
2026-02-14 20:58:51 -05:00
parent cc85a4bdb1
commit 2a19755804
657 changed files with 49050 additions and 32001 deletions

View File

@@ -2,6 +2,7 @@ package lexers
import (
"regexp"
"slices"
"strings"
"unicode/utf8"
@@ -1318,21 +1319,11 @@ func indexAt(str []rune, substr []rune, pos int) int {
return idx
}
// Tells if an array of string contains a string
func contains(s []string, e string) bool {
for _, value := range s {
if value == e {
return true
}
}
return false
}
type rulePosition int
const (
topRule rulePosition = 0
bottomRule = -1
topRule rulePosition = 0 - iota
bottomRule
)
type ruleMakingConfig struct {
@@ -1625,15 +1616,15 @@ func quote(groups []string, state *LexerState) Iterator {
var tokenState string
switch {
case keyword == "qq" || contains(tokenStates, "qq"):
case keyword == "qq" || slices.Contains(tokenStates, "qq"):
tokenState = "qq"
case adverbsStr == "ww" || contains(tokenStates, "ww"):
case adverbsStr == "ww" || slices.Contains(tokenStates, "ww"):
tokenState = "ww"
case contains(tokenStates, "Q-closure") && contains(tokenStates, "Q-variable"):
case slices.Contains(tokenStates, "Q-closure") && slices.Contains(tokenStates, "Q-variable"):
tokenState = "qq"
case contains(tokenStates, "Q-closure"):
case slices.Contains(tokenStates, "Q-closure"):
tokenState = "Q-closure"
case contains(tokenStates, "Q-variable"):
case slices.Contains(tokenStates, "Q-variable"):
tokenState = "Q-variable"
default:
tokenState = "Q"