Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
littleBu
OpenXG-RAN
Commits
771d11a1
Commit
771d11a1
authored
7 months ago
by
Bartosz Podrygajlo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dockerized clang-format error detection tool
parent
469d58f9
Branches unavailable
2025.w08
2025.w07
2025.w06
2025.w05
2025.w04
2025.w03
2025.w02
2024.w51
2024.w50
2024.w49
2024.w48
2024.w47
2024.w46
2024.w45
2024.w44
2024.w43
2024.w42
2024.w41
2024.w40
v2.2.0
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
48 additions
and
0 deletions
+48
-0
doc/clang-format.md
doc/clang-format.md
+4
-0
tools/formatting/README.md
tools/formatting/README.md
+26
-0
tools/formatting/detect_clang_format_errors.sh
tools/formatting/detect_clang_format_errors.sh
+5
-0
tools/formatting/docker-compose.yaml
tools/formatting/docker-compose.yaml
+13
-0
No files found.
doc/clang-format.md
View file @
771d11a1
...
...
@@ -64,3 +64,7 @@ When this is done, you are set up. How to use:
6) Commit. It won't work if code is not properly formatted due to the
pre-commit hook. Force committing with
`git commit --no-verify`
# Checking errors introduced by a branch
Here is the script that can be used to detect any clang-format errors introduced by a branch
[
here
](
../tools/formatting/README.md
)
This diff is collapsed.
Click to expand it.
tools/formatting/README.md
0 → 100644
View file @
771d11a1
# Overview
Dockerized tool to list clang-format errors introduced in a branch.
# Usage
Checkout the branch you want to compare. This is necessary because if there are files added by the branch
they need to be present for clang-format to analyze them.
Then:
```
./tools/formatting/detect_clang_format_errors.sh
```
Or
```
docker compose up
```
Or (to avoid docker related lines in stdout)
```
docker compose run clang-formatter | tee output
```
This diff is collapsed.
Click to expand it.
tools/formatting/detect_clang_format_errors.sh
0 → 100755
View file @
771d11a1
#!/bin/bash
set
-eo
pipefail
BASE_COMMIT
=
$(
git merge-base HEAD origin/develop
)
git diff
-U0
--no-color
$BASE_COMMIT
...HEAD | clang-format-diff
-p1
This diff is collapsed.
Click to expand it.
tools/formatting/docker-compose.yaml
0 → 100644
View file @
771d11a1
services
:
clang-formatter
:
image
:
clang-formatter
build
:
dockerfile_inline
:
|
FROM ubuntu:22.04
RUN DEBIAN_FRONTEND=noninteractive apt update && apt install -y git clang-format
volumes
:
-
../../:/code/
command
:
bash -c "git config --global --add safe.directory /code && cd /code/ && \
git config --global clangFormat.style file && \
./tools/formatting/detect_clang_format_errors.sh"
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment