Exclude lgtm false positives

Open
#59 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
tooling

Research direction

Start by locating sample_lib and the LGTM configuration or analysis entry for string-copy-return-value-as-boolean. Inspect how the strncpy return value is used there and identify the narrowest exclusion supported by the project. Done means the intentional sample_lib usage no longer produces this false positive without broadly suppressing the warning.

Written by the indexing model from the issue text.

Description

enhancement

Is your feature request related to a problem? Please describe.
sample_lib triggers a lgtm error based on checking strncpy return (false alarm)

Describe the solution you'd like
Exclude string-copy-return-value-as-boolean (triggered by sample_lib, which is doing this on purpose)

Describe alternatives you've considered
Could clutter code to exclude this specific call from triggering the warning.

Additional context
None

Requester Info
Jacob Hageman - NASA/GSFC

Dominant language
C
Stars
1.5k
Forks
391
Avg merge
1d 11h
Merged PRs (30d)
19

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nasa/cFS

All issues in nasa/cFS

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.