Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -399,13 +399,14 @@ const customLinterPath = "./_tools/custom-gcl";
const customLinterHashPath = customLinterPath + ".hash";

const golangciLintPackage = memoize(() => {
const golangciLintYml = fs.readFileSync(".custom-gcl.yml", "utf8");
const pattern = /^version:\s*(v\d+\.\d+\.\d+).*$/m;
const match = pattern.exec(golangciLintYml);
if (!match) {
throw new Error("Expected version in .custom-gcl.yml");
}
const version = match[1];
// const golangciLintYml = fs.readFileSync(".custom-gcl.yml", "utf8");
// const pattern = /^version:\s*(v\d+\.\d+\.\d+).*$/m;
// const match = pattern.exec(golangciLintYml);
// if (!match) {
// throw new Error("Expected version in .custom-gcl.yml");
// }
// const version = match[1];
Copy link

Copilot AI Dec 2, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this is a temporary workaround, consider adding a TODO or FIXME comment to remind future maintainers to revert this change once the golangci-lint issue is resolved. For example:

// TODO: Revert to reading from .custom-gcl.yml once https://github.com/golangci/golangci-lint/issues/6205 is resolved
const version = "v2.6.3-0.20251130135459-0212d7c8deac"; // https://github.com/golangci/golangci-lint/issues/6205
Suggested change
// const version = match[1];
// const version = match[1];
// TODO: Revert to reading from .custom-gcl.yml once https://github.com/golangci/golangci-lint/issues/6205 is resolved

Copilot uses AI. Check for mistakes.
const version = "v2.6.3-0.20251130135459-0212d7c8deac"; // https://github.com/golangci/golangci-lint/issues/6205
const major = version.split(".")[0];
const versionSuffix = ["v0", "v1"].includes(major) ? "" : "/" + major;

Expand Down