Skip to content

Codify grouping and order of includes #6620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

tautschnig
Copy link
Collaborator

clang-format supports describing groups of includes via regular
expressions and assigning priorities to them. The include file
corresponding to an implementation will always have priority 0. Other
priorities are now set in the clang-format configuration. Includes not
specified will be auto-assigned INT_MAX as priority.

If people disagree with the proposed order (implementation-header file; util; goto-programs; any other directory; current directory; standard library) then please just voice this.

  • Each commit message has a non-empty body, explaining why the change was made.
  • n/a Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • The feature or user visible behaviour I have added or modified has been documented in the User Guide in doc/cprover-manual/
  • n/a Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • n/a My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • n/a White-space or formatting changes outside the feature-related changed lines are in commits of their own.

@tautschnig tautschnig self-assigned this Feb 1, 2022
CI jobs running on github are less likely to temporarily fail when using
mirrors from github.com. The (transient?) failure seen most recently
was:
```
git clone -b v5.10 --depth=1 https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git linux_5_10
Cloning into 'linux_5_10'...
remote: aborting due to possible repository corruption on the remote side.
fatal: early EOF
fatal: fetch-pack: invalid index-pack output
```
This commit seeks to address this kind of problem.
@codecov
Copy link

codecov bot commented Feb 1, 2022

Codecov Report

Merging #6620 (3b7b19a) into develop (dfb5679) will increase coverage by 0.00%.
The diff coverage is 92.30%.

Impacted file tree graph

@@           Coverage Diff            @@
##           develop    #6620   +/-   ##
========================================
  Coverage    76.64%   76.64%           
========================================
  Files         1579     1579           
  Lines       181485   181479    -6     
========================================
- Hits        139103   139101    -2     
+ Misses       42382    42378    -4     
Impacted Files Coverage Δ
src/pointer-analysis/value_set.cpp 83.16% <90.47%> (+0.18%) ⬆️
src/analyses/goto_check_c.cpp 90.64% <100.00%> (+0.25%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 90f64fa...3b7b19a. Read the comment docs.

clang-format supports describing groups of includes via regular
expressions and assigning priorities to them. The include file
corresponding to an implementation will always have priority 0. Other
priorities are now set in the clang-format configuration. Includes not
specified will be auto-assigned INT_MAX as priority.
@tautschnig tautschnig force-pushed the cleanup/clang-format-includes branch from 4ce3db5 to 3b7b19a Compare February 1, 2022 12:51
@tautschnig tautschnig merged commit f2240be into diffblue:develop Feb 1, 2022
@tautschnig tautschnig deleted the cleanup/clang-format-includes branch February 1, 2022 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants