Fraunhofer-IIS / libjapi

libjapi is a universal JSON to C API library. It receives newline-delimited JSON (NDJSON) messages via TCP and calls registered C functions. A JSON response is returned for each request. Furthermore, it is also possible to create push services, which asynchronously push JSON messages to the clients subscribed to them.
MIT License
3 stars 1 forks source link

Resolve "Add clang-format" - [merged] #117

Closed fraunhofer-iis-bot closed 1 year ago

fraunhofer-iis-bot commented 1 year ago

In GitLab by @jannismain on Jul 11, 2023, 10:08

Merges 50-add-make-format-target -> dev

Adding a .clang-format configuration file that resembles the intended coding style found in the code base.

The intended coding style is discovered by adjusting the clang format configuration until the diff is small and only fixes inconsistencies.

Closes #50

fraunhofer-iis-bot commented 1 year ago

In GitLab by @jannismain on Jul 11, 2023, 10:25

There is inconsistent pointer alignment (char* foo vs. char *foo) in the code base.

There seem to be some reasons^1 to favor right alignment and forcing right alignment produces a smaller diff than forcing left alignment.

So I choose right alignment as the intended formatting for now.

fraunhofer-iis-bot commented 1 year ago

In GitLab by @jannismain on Jul 11, 2023, 10:28

changed target branch from master to dev

fraunhofer-iis-bot commented 1 year ago

In GitLab by @jannismain on Jul 11, 2023, 14:46

added 1 commit

Compare with previous version

fraunhofer-iis-bot commented 1 year ago

In GitLab by @jannismain on Jul 11, 2023, 15:42

marked this merge request as ready

fraunhofer-iis-bot commented 1 year ago

In GitLab by @jannismain on Jul 11, 2023, 15:42

requested review from @vornkat-iis

fraunhofer-iis-bot commented 1 year ago

In GitLab by @jannismain on Jul 11, 2023, 15:49

added 12 commits

Compare with previous version

fraunhofer-iis-bot commented 1 year ago

In GitLab by @vornkat-iis on Jul 11, 2023, 17:21

Pre-commit does not want to run in my WSL Debian 11:

> pre-commit run
An error has occurred: InvalidManifestError: 
==> File /home/szk/.cache/pre-commit/repo_qj_2p5a/.pre-commit-hooks.yaml
==> At Hook(id='clang-format')
==> At key: types_or
==> At index 9
=====> Type tag 'textproto' is not recognized.  Try upgrading identify and pre-commit?

If I remove "textproto", it works.

> pre-commit -V
pre-commit 3.3.3
fraunhofer-iis-bot commented 1 year ago

In GitLab by @vornkat-iis on Jul 11, 2023, 17:45

approved this merge request

fraunhofer-iis-bot commented 1 year ago

In GitLab by @vornkat-iis on Jul 11, 2023, 17:45

mentioned in commit d311e27644c600ce796a967db233a95c9024fad3

fraunhofer-iis-bot commented 1 year ago

In GitLab by @vornkat-iis on Jul 11, 2023, 17:46

Solution: Do as you are told and pip install --upgrade identify and ... pre-commit

fraunhofer-iis-bot commented 1 year ago

In GitLab by @vornkat-iis on Jul 11, 2023, 17:46

resolved all threads