Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
CppCXY committed Sep 29, 2024
2 parents 4ab859f + 5cb772d commit e728970
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
runs-on: [ubuntu-latest]
steps:
- name: Download
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
- name: Display structure of downloaded files
run: ls -R
- name: zip win32-x64
Expand Down
7 changes: 5 additions & 2 deletions CodeFormat/src/LuaCheck.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@ bool LuaCheck::CheckSingleFile(const FormatContext &context, std::string_view pa

bool LuaCheck::CheckWorkspace(const FormatContext &context) {
auto workspace = context.GetWorkspace();
bool diagnosis = false;
FileFinder finder(workspace);
finder.AddFindExtension(".lua");
finder.AddFindExtension(".lua.txt");
Expand All @@ -136,10 +137,12 @@ bool LuaCheck::CheckWorkspace(const FormatContext &context) {
auto style = context.GetStyle(relativePath);
if (CheckSingleFile(context, relativePath, std::move(opText.value()), style)) {
std::cerr << util::format("Check {} ok.", relativePath) << std::endl;
} else {
diagnosis = true;
}
} else {
std::cerr << util::format("Can not read file {}", relativePath) << std::endl;
}
}
return true;
}
return !diagnosis;
}

0 comments on commit e728970

Please sign in to comment.