Comments (7)
This is such a general topic I think you should maybe use this ticket to discuss/consider/enumerate explicit CI features that are desired. General areas for research/inclusion are:
-
Code formatting: Black for python (see #22 ) , but anything for C? Even the linux kernel has a preferred formatting script.
-
Static analysis/linting -
- python
- Black
pylintflake8- mypy? (typechecking)
- C
- cppcheck
-
-Wall -Werror
- valgrind ?
- There's a whole list at https://en.wikipedia.org/wiki/List_of_tools_for_static_code_analysis#C,_C++ that should be gone through to see what might be useful
- python
-
test framework
- python - most python projects use pytest, which is great, and we should set up the repo to have a clear place for tests to go and the CI to invoke those tests
- C - there are a few unit test frameworks, but someone needs to choose one and set up the repo to have a clear place for them and the CI to get them built and run
from solo1.
hey, I run black
on tools/
. It changed everything :) Then I run both flake8
and pycodestyle
and both were still complaining.
How about we setup pytest clean, and we start using flake8
100% there, and when black is ready we retest it?
from solo1.
On the C side, I quickly tried:
- cppcheck, that resulted in #25
- oclint
- uncrustify
For the last 2... I couldn't really run them successfully. I think one way to go would be to setup CMake (maybe not as a main build system, but at least as a parallel one), as both sort-of rely on CMake architecture/structure to import all the files in a complex project.
We could start by integrating cppcheck, and go from there.
from solo1.
On valgrind, I'm having issues on the Mac... I think because of the Mac, not because of Solo.
In #24 I'm proposing to catch sigint on the PC implementation, so we can cleanup properly. Once main is built, we could run valgrind main, run a bunch of tests, then kill main, and see the results from valgrind.
This, however, only tests fido2 app + pc impl. It doesn't really test the device-specific code.
from solo1.
@0x0ece flake8
and black
have different opinions and it's not likely that they will become compatible any time soon. So there is no option to use flake8
and then switch to black
. I personally find black
's code style easier to read than flake8
's.
from solo1.
from solo1.
in my pull request #51 i started this by integrating black, and by making Travis build each solo build configuration with -Wall -Werror to see if there are errors and warnings, similar to what @0x0ece did in #24 for the PC build, this has helped clean up the code, any more integrations would be better, see #69 by @pjz
from solo1.
Related Issues (20)
- Not showing under WSL HOT 2
- Cant register Solo 1 Tap USB-A
- Documentation Udev rules Linux is wrong
- Non compliance with spec in ctap_parse_client_pin ?
- CTAP Error - NOT_ALLOWED when trying to program firmware HOT 1
- Registered key not recognised
- Opened by mistake
- New solo key usb-c not recognized by login sysem on linux HOT 6
- Cant proceed firmware update for Solo2
- Problem adding ssh key to the SSH agent. HOT 1
- Solo2 fails to register with Okta as NFC device
- Project dead? HOT 3
- Compatibility with ESP-WROOM-32?? HOT 4
- broken link in docs/contributing.md
- Docker build all failed on macOS HOT 3
- Solo1 Ubuntu passwordless login HOT 1
- Solo Hacker Not Found with WSL HOT 3
- fido2.ctap.CtapError when running `solo1 key keyboard 'sequence'` HOT 1
- SoloKey dead after updating firmware to 4.1.5 HOT 1
- Broken link in FAQ https://solokeys.com/pages/faq
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 solo1.