Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fmt] Ignore gitignored files by default and implement --no-ignore-vcs to disable it #969

Open
ken-matsui opened this issue Aug 12, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@ken-matsui
Copy link
Member

Like poac lint ignores gitignored files by default, poac fmt also wants to ignore those files. Also, we want --no-ignore-vcs to disable this default behavior.

poac/src/Cmd/Lint.cc

Lines 37 to 49 in f32c760

// Read .gitignore if exists
if (fs::exists(".gitignore")) {
std::ifstream ifs(".gitignore");
std::string line;
while (std::getline(ifs, line)) {
if (line.empty() || line[0] == '#') {
continue;
}
cpplintCmd += " --exclude=";
cpplintCmd += line;
}
}

@ken-matsui ken-matsui added the good first issue Good for newcomers label Aug 12, 2024
@ken-matsui ken-matsui added the enhancement New feature or request label Oct 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant