Coder Social home page Coder Social logo

Continuous Integration about solo1 HOT 7 CLOSED

solokeys avatar solokeys commented on May 27, 2024 1
Continuous Integration

from solo1.

Comments (7)

pjz avatar pjz commented on May 27, 2024

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 -

  • 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.

0x0ece avatar 0x0ece commented on May 27, 2024

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.

0x0ece avatar 0x0ece commented on May 27, 2024

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.

0x0ece avatar 0x0ece commented on May 27, 2024

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.

ignaloidas avatar ignaloidas commented on May 27, 2024

@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.

0x0ece avatar 0x0ece commented on May 27, 2024

from solo1.

yparitcher avatar yparitcher commented on May 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.