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

Format with clang-foramt 18.1 #840

Merged
merged 2 commits into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 3 additions & 3 deletions .github/workflows/commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ jobs:
steps:
- name: Checkout last commit
uses: actions/checkout@v4
- name: Install clang-format
run: brew install clang-format
- name: Lint
- name: Install latest lang-format
run: brew update && brew install clang-format
- name: Code style lint
run: make clang-format-lint

linux:
Expand Down
8 changes: 4 additions & 4 deletions src/rime/algo/encoder.cc
Original file line number Diff line number Diff line change
Expand Up @@ -255,13 +255,13 @@ bool TableEncoder::DfsEncode(const string& phrase,
}
string encoded;
if (Encode(*code, &encoded)) {
DLOG(INFO) << "encode '" << phrase << "': "
<< "[" << code->ToString() << "] -> [" << encoded << "]";
DLOG(INFO) << "encode '" << phrase << "': " << "[" << code->ToString()
<< "] -> [" << encoded << "]";
collector_->CreateEntry(phrase, encoded, value);
return true;
} else {
DLOG(WARNING) << "failed to encode '" << phrase << "': "
<< "[" << code->ToString() << "]";
DLOG(WARNING) << "failed to encode '" << phrase << "': " << "["
<< code->ToString() << "]";
return false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions src/rime/dict/dict_compiler.cc
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,8 @@ bool DictCompiler::Compile(const path& schema_file) {
} else {
rebuild_prism = true;
}
LOG(INFO) << dict_file << "[" << dict_files.size() << " file(s)]"
<< " (" << dict_file_checksum << ")";
LOG(INFO) << dict_file << "[" << dict_files.size() << " file(s)]" << " ("
<< dict_file_checksum << ")";
LOG(INFO) << schema_file << " (" << schema_file_checksum << ")";
{
the<ResourceResolver> resolver(
Expand Down
4 changes: 2 additions & 2 deletions src/rime/dict/entry_collector.cc
Original file line number Diff line number Diff line change
Expand Up @@ -114,8 +114,8 @@ void EntryCollector::Collect(const path& dict_file) {
encode_queue.push({word, weight_str});
}
if (!stem_str.empty() && !code_str.empty()) {
DLOG(INFO) << "add stem '" << word << "': "
<< "[" << code_str << "] = [" << stem_str << "]";
DLOG(INFO) << "add stem '" << word << "': " << "[" << code_str << "] = ["
<< stem_str << "]";
stems[word].insert(stem_str);
}
}
Expand Down