Comments (9)
I might have to use a matrix in the CI to test various versions of python with various versions of clang-tools on various OSs... My new database test is failing in CI, but it passes fine locally.
from cpp-linter-action.
The test coverage is already very high 👍
@2bndy5 I have created a org secret with a new codecov token and also removed codecov token for cpp-linter/clang-tools-pip, then rerun the test action of clang-tools-pip, it still works.
from cpp-linter-action.
When --files-changed-only=ture
, it should ignore submodules.
When --files-changed-only=false
, analyze any source files in the repo including submodules.
So the current behavior of --files-changed-only=false
is not expected?
I'm wondering if we should change files-changed-only
default value to true. I guess users only care about modified files, not all source files.
from cpp-linter-action.
When --files-changed-only=false, analyze any source files in the repo including submodules.
This was not my original intention. It doesn't make sense (to me) for a linter to be concerned with external sources. That's why in the README, I noted the ignore
option can be used to explicitly include submodules (just not hidden folders that begin with a .
like .github
).
I'm wondering if we should change files-changed-only default value to true. I guess users only care about modified files, not all source files.
I have no objections to this. I think this was the original default until we started encouraging users to have a actions/checkout
step. I also expect most users only want the file changes analyzed. Personally, I've been using this action to check all sources in my projects (for completeness because I itch for that 💯 ). I haven't been using clang-tidy for anything lately (but that may change in the future).
from cpp-linter-action.
I'm almost ready to draft a PR... There's a lot of changes, so the description will be wordy. I'd like to learn a bit more about pytest (& plugins) to optimize the unit tests I've written.
from cpp-linter-action.
It doesn't make sense (to me) for a linter to be concerned with external sources
I agree we should only analyze any source files and ignore submodules when --files-changed-only=false
No worries, take your time. I'm also learning about pytest to refactor my bad smell unit tests :(
from cpp-linter-action.
It also failed in my local environment.
/home/ubuntu/.local/lib/python3.8/site-packages/requests/adapters.py:501: ConnectionError
--------------------------------------------- Captured log call ---------------------------------------------
WARNING CPP Linter:run.py:340 Could not find pcsound/pcsound.c! Did you checkout the repo?
========================================== short test summary info ==========================================
FAILED tests/lines_changed_only/test_lines_changed_only.py::test_run_clang_format_diff_only - requests.exc...
FAILED tests/lines_changed_only/test_lines_changed_only.py::test_run_clang_format_diff_adds - requests.exc...
================================= 2 failed, 22 passed in 257.41s (0:04:17) =================================
It's hang and failed from tests/lines_changed_only/test_lines_changed_only.py::test_run_clang_format_diff_only
tests/ignored_paths/test_ignored_paths.py::test_not_ignored PASSED [ 83%]
tests/ignored_paths/test_ignored_paths.py::test_ignore_submodule PASSED [ 87%]
tests/lines_changed_only/test_lines_changed_only.py::test_lines_changed_only PASSED [ 91%]
tests/lines_changed_only/test_lines_changed_only.py::test_run_clang_format_diff_only
from cpp-linter-action.
It failed locally for you because it couldn't download the source files from the commit that I'm using in the test.
The test that failed for you was the lines-changed-only test. The one that failed in CI was the database test.
from cpp-linter-action.
I've been playing with test coverage to see what else needs to be tested. So far I'm (locally) getting 94% coverage if I exclude any functions that directly use the REST API for thread comments:
I also configured coverage.py to ignore code specific to type checking and anything related to using rich as a logging extension, thus __init__.py
is 100% covered. cpp_linter/thread_comments.py
is also ignored because we would need a real CI event to test that code.
@shenxianpeng I see you've already created a codecov token for cpp-linter/clang-tools-pip. Can you create a org secret with a new codecov token, so we can use it for multiple repos? Or does the token have to specific to a project?
ps - Ensuring the best coverage has caused further improvements to the code base.
from cpp-linter-action.
Related Issues (20)
- How to specify "Build path" (`-p`) for .clang-tidy? HOT 2
- Option to only post thread comment when errors are detected HOT 14
- Warning: 2 File(s) not formatted (should be 1) HOT 3
- How to make cpp-linter-action work with Conan? HOT 5
- Seperate output for `clang-format` and `clang-tidy` HOT 5
- Python `error: externally-managed-environment` during installation HOT 32
- _pygit2.GitError: repository path '/__w/Waybar/Waybar/' is not owned by current user HOT 6
- [BUG][v2.7.4] _pygit2.GitError: trailing data at line 3734 HOT 12
- Preparing for v2.9.0 PR review feature release HOT 8
- State what python version is used in README HOT 8
- create an examples folder to demonstrate various usage HOT 2
- generate the "Inputs and Outputs" page using action.yml
- cpp-linter workflows runs for every change HOT 9
- Incorrectly added `latest` tag for PR testing and not trigger test action HOT 2
- unexpected `minimun-version` field on latest v2 release HOT 5
- Option to allow acting against different files for clang-tidy and clang-format HOT 4
- MacOS runners fail with clang versions 15-18 HOT 6
- Update "What's New" of v2 in README page HOT 3
- apt install stuck at "Nothing to restart" with custom container image HOT 7
- Using a path as version will not work HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cpp-linter-action.