Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit c26eea8

Browse files
Revert "chore: use annotations instead of in house linter (TheAlgorithms#2905)" (TheAlgorithms#2944)
This reverts commit 41653de.
1 parent 77b9f39 commit c26eea8

File tree

2 files changed

+42
-22
lines changed

2 files changed

+42
-22
lines changed

‎.github/workflows/approved-label.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ jobs:
55
name: Add "approved" label when approved
66
runs-on: ubuntu-latest
77
steps:
8-
- name: Add "approved" label when approved
9-
uses: abinoda/label-when-approved-action@v1.0.7
10-
env:
11-
APPROVALS: "1"
12-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13-
ADD_LABEL: "approved"
14-
REMOVE_LABEL: ""
8+
- name: Add "approved" label when approved
9+
uses: pullreminders/label-when-approved-action@master
10+
env:
11+
APPROVALS: "1"
12+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
13+
ADD_LABEL: "approved"
14+
REMOVE_LABEL: ""

‎.github/workflows/awesome_workflow.yml

Lines changed: 35 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,50 @@
11
name: Awesome CI Workflow
22
on: [push, pull_request]
33
permissions:
4-
pull-requests: write
54
contents: write
6-
issues: write
75

86
jobs:
97
MainSequence:
108
name: Code Formatter
119
runs-on: ubuntu-latest
12-
permissions:
13-
pull-requests: write
14-
contents: write
15-
issues: write
1610
steps:
1711
- uses: actions/checkout@v4
18-
- uses: cpp-linter/cpp-linter-action@v2
19-
id: linter
20-
env:
21-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2212
with:
23-
style: "file"
24-
tidy-checks: ".clang-tidy"
25-
thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
13+
fetch-depth: 0
14+
- uses: actions/setup-python@v4
15+
- name: requirements
16+
run: |
17+
sudo apt-get -qq update
18+
sudo apt-get -qq install clang-tidy clang-format
19+
# checks are passing with less errors when used with this version.
20+
# The default installs v6.0 which did not work out well in my tests
21+
- name: Setup Git Specs
22+
run: |
23+
git config --global user.name github-actions[bot]
24+
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
25+
- name: Filename Formatter
26+
run: |
27+
wget https://raw.githubusercontent.com/TheAlgorithms/scripts/main/filename_formatter.sh
28+
chmod +x filename_formatter.sh
29+
./filename_formatter.sh . .cpp,.hpp
30+
- name: Get file changes
31+
run: |
32+
git branch
33+
git diff --diff-filter=dr --name-only origin/master > git_diff.txt
34+
echo "Files changed-- `cat git_diff.txt`"
35+
- name: Configure for static lint checks
36+
# compiling first gives clang-tidy access to all the header files and settings used to compile the programs.
37+
# This will check for macros, if any, on linux and not for Windows. But the use of portability checks should
38+
# be able to catch any errors for other platforms.
39+
run: cmake -B build -S . -DCMAKE_EXPORT_COMPILE_COMMANDS=ON
40+
- name: Lint modified files
41+
shell: bash
42+
run: python3 scripts/file_linter.py
43+
- name: Commit and push changes
44+
run: |
45+
git diff DIRECTORY.md
46+
git commit -am "clang-format and clang-tidy fixes for ${GITHUB_SHA::8}" || true
47+
git push origin HEAD:$GITHUB_REF || true
2648
2749
build:
2850
name: Compile checks
@@ -37,8 +59,6 @@ jobs:
3759
- uses: actions/checkout@v4
3860
with:
3961
submodules: true
40-
- name: GCC problem matcher
41-
uses: ammaraskar/gcc-problem-matcher@0.3.0
4262
- run: |
4363
cmake -B ./build -S .
4464
cmake --build build --parallel 4

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /