suricata icon indicating copy to clipboard operation
suricata copied to clipboard

Clang format branch policy clarifications - v1

Open jufajardini opened this issue 1 year ago • 3 comments

According to these comments: https://github.com/OISF/suricata/pull/7708#discussion_r941520587, our clang script error messages and our documentation on coding style were a bit misleading in terms of how we prefer to have formatting changes in commits.

Tried to make those better reflect our expectations.

Link to redmine ticket: none

Describe changes:

  • Adjust clang-format Error message in case of formatting needed to avoid rewrite-branch usage
  • Update our devguide to clarify that minor formatting changes may be appended to their related commit, but in general formatting changes should go to dedicated commits
  • trivial formatting changes to the related devguide file

jufajardini avatar Aug 09 '22 19:08 jufajardini

I wonder if this actually works with our CI check. I think that checks each commit.

victorjulien avatar Aug 09 '22 19:08 victorjulien

Codecov Report

Merging #7711 (297751a) into master (debdff0) will increase coverage by 0.00%. The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #7711   +/-   ##
=======================================
  Coverage   75.99%   75.99%           
=======================================
  Files         660      660           
  Lines      185705   185705           
=======================================
+ Hits       141127   141130    +3     
+ Misses      44578    44575    -3     
Flag Coverage Δ
fuzzcorpus 60.69% <ø> (ø)
suricata-verify 52.57% <ø> (+<0.01%) :arrow_up:
unittests 60.71% <ø> (-0.01%) :arrow_down:

Flags with carried forward coverage won't be shown. Click here to find out more.

codecov[bot] avatar Aug 09 '22 19:08 codecov[bot]

I wonder if this actually works with our CI check. I think that checks each commit.

Looking at https://github.com/OISF/suricata/blob/master/.github/workflows/formatting.yml#L139, I think that it checks each commit, but won't print the error from the clang script for each failing commit.

jufajardini avatar Aug 09 '22 19:08 jufajardini

WARNING:

field baseline test %
SURI_TLPW1_stats_chk
.tcp.rst 128100 103908 81.11%
SURI_TLPR1_stats_chk
.flow.memuse 557245568 617949568 110.89%

Pipeline 9973

suricata-qa avatar Oct 10 '22 09:10 suricata-qa

@victorjulien I think this one could go in a 'Next' PR? :)

jufajardini avatar Dec 23 '22 19:12 jufajardini

WARNING:

field baseline test %
SURI_TLPW1_stats_chk
.tcp.rst 128100 103908 81.11%
SURI_TLPR1_stats_chk
.flow.memuse 557245568 617949568 110.89%

Pipeline 9973

suricata-qa avatar Jan 23 '23 23:01 suricata-qa

ERROR:

ERROR: QA failed on SURI_TLPW1_stats_chk.

ERROR: QA failed on SURI_TLPR1_stats_chk.

Pipeline 9973

suricata-qa avatar May 01 '23 18:05 suricata-qa

Merged in #8815, thanks!

victorjulien avatar May 05 '23 15:05 victorjulien