You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
RDKB-66207: [CI] gcc diff-gate on gcc-14, complexity and source-coverage nudges - #1538
gcc diff-gate recompiles with gcc 14. Base and head are recompiled with gcc-14 / g++-14
(preinstalled on the ubuntu-24.04 runner; the build itself stays on gcc 13), so the gate also
covers the two default errors gcc 13 has no flag for: -Wreturn-mismatch (what actually breaks
this build on gcc 14) and -Wdeclaration-missing-parameter-type; -Wcalloc-transposed-args joins
the warnings. The recompile also undefines _FORTIFY_SOURCE: Ubuntu's gcc fortifies at -Os,
which reports an overflowing memcpy/strcpy inside a glibc header, a line the gate never
matched; it is now reported on the .c line.
Complexity nudge. lizard compares each changed function's cyclomatic complexity at the PR base
and head. A function the PR pushes over 30 gets a ❗ inline comment on its first changed line and
a summary entry; one that grew by 5 or more and ends at 20 or above is listed in the summary. A
function moved out of another changed or removed file keeps its old complexity. If lizard cannot
analyze a file, nothing is compared and the summary says so. Never fails the build.
Source-coverage nudge. A source file the PR adds that a Makefile.am builds but neither build/linux/{bpi,rpi}/makefile compiles (explicit entries plus what their $(wildcard ...)
patterns match, minus $(filter-out ...); in a directory a leg already compiles from) is
reported in the summary with a file annotation: CI would never compile it. XB-only files are the
legitimate exception, so it never fails the build.
The summary comment gets a nudge section after the diff-scoped checks, each nudge capped at 6000
bytes or its share of what is left above a 4000-byte build minimum;
the inline job posts complexity comments alongside gcc and clang-tidy ones. ci-README.md 3d, 3f,
3g and the artifact lists updated.
Both nudges report only what the PR adds (complexity compared with the base, coverage on added
files). The stage-2 parts (summary section, inline complexity comments) run from develop, so they
take effect after merge.
The reason will be displayed to describe this comment to others. Learn more.
🔵 Needs a closer look
Complexity analysis can report false crossings for moved functions and select invalid inline anchors in renamed files.
No open issues 🎉
2 previously missed issues
In code that hasn't changed since last review
Preserve rename mapping for valid inline comment anchors
.github/scripts/complexity_delta.py:119
The workflow includes renamed files, but limiting this diff to the new path excludes the old path from rename detection. Git then reports the whole file as added. If a function in a renamed file grows from CCN 29 to 31, first_changed selects its definition rather than its first edited line. When that definition is outside the PR's rename diff, the review API rejects the inline comment and review_poster skips it on HTTP 422. Preserve the old/new path mapping and derive ranges from a rename-aware diff containing both paths, so the comment anchors to an actual edited line.
Aggregate maximum complexity for ambiguous moved functions
.github/scripts/complexity_delta.py:235
When multiple changed or removed files lose a function with the same name, this comprehension keeps the last complexity value, so the baseline depends on file order. Moving an unchanged CCN-40 helper into a new file while deleting a CCN-12 namesake elsewhere can therefore produce a false 12 -> 40 crossing. Aggregate the maximum CCN per moved name, as parse_lizard_csv already does within a file, so ambiguous moves remain conservative rather than reporting complexity the PR did not introduce.
Base and head are recompiled with gcc-14/g++-14 (preinstalled on the
runner), gating -Wreturn-mismatch and -Wdeclaration-missing-parameter-type
too. -U_FORTIFY_SOURCE puts mem*/str* overflows on the .c line.
lizard compares per-function CCN at the PR base and head. A function
pushed over 30 gets an inline warning and a summary entry; one that grew
by 5 to 20 or more is listed in the summary. Moved functions keep their CCN.
Report an added source that a Makefile.am builds but neither the bpi
nor the rpi makefile compiles, in a directory a leg already compiles
from: summary section plus a file annotation; never fails the build.
complexity: a lizard failure stops the comparison (no false "new at N").
source coverage: expand leg $(wildcard)s minus $(filter-out); am tokens
relative to their Makefile.am. Summary: nudges share what is left above
a 4000-byte build minimum, so the build budget never goes negative.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reason for change.
(preinstalled on the
ubuntu-24.04runner; the build itself stays on gcc 13), so the gate alsocovers the two default errors gcc 13 has no flag for:
-Wreturn-mismatch(what actually breaksthis build on gcc 14) and
-Wdeclaration-missing-parameter-type;-Wcalloc-transposed-argsjoinsthe warnings. The recompile also undefines
_FORTIFY_SOURCE: Ubuntu's gcc fortifies at-Os,which reports an overflowing
memcpy/strcpyinside a glibc header, a line the gate nevermatched; it is now reported on the
.cline.and head. A function the PR pushes over 30 gets a ❗ inline comment on its first changed line and
a summary entry; one that grew by 5 or more and ends at 20 or above is listed in the summary. A
function moved out of another changed or removed file keeps its old complexity. If lizard cannot
analyze a file, nothing is compared and the summary says so. Never fails the build.
Makefile.ambuilds but neitherbuild/linux/{bpi,rpi}/makefilecompiles (explicit entries plus what their$(wildcard ...)patterns match, minus
$(filter-out ...); in a directory a leg already compiles from) isreported in the summary with a file annotation: CI would never compile it. XB-only files are the
legitimate exception, so it never fails the build.
bytes or its share of what is left above a 4000-byte build minimum;
the inline job posts complexity comments alongside gcc and clang-tidy ones.
ci-README.md3d, 3f,3g and the artifact lists updated.
Both nudges report only what the PR adds (complexity compared with the base, coverage on added
files). The stage-2 parts (summary section, inline complexity comments) run from develop, so they
take effect after merge.