Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • G gitlab-ci-pipeline
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 0
    • Issues 0
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • IOPSYS
  • gitlab-ci-pipeline
  • Merge requests
  • !11

Merged
Created Nov 18, 2021 by Anjan Chanda@anjancxDeveloper

static-code-analysis: cpd: increase minimum number of tokens to match

  • Overview 0
  • Commits 1
  • Changes 1

Need to increase minimum number of tokens to be matched for duplicate detection. Value 100 seems to be not suitable and it generates false warnings as following -

-snip-

Found a 9 line (103 tokens) duplication in the following files: Starting at line 319 of /home/anjan/IOPSYS/smarthub3/build_dir/target-arm_xscale_musl_eabi/map-controller-5.1.1/src/utils/utils.c Starting at line 148 of /home/anjan/IOPSYS/smarthub3/build_dir/target-arm_xscale_musl_eabi/map-controller-5.1.1/src/utils/utils.h

int list_join_uniq(void *priv, struct list_head *a, struct list_head *b, struct list_head *out, int (*match)(void *priv, struct list_head *a, struct list_head *b), struct list_head *(*create_jentry)(void *priv, struct list_head *a, struct list_head *b), void (*free_jentry)(void *priv, struct list_head *), void (*free_entry_a)(struct list_head *), void (*free_entry_b)(struct list_head *)) -snip-

'cpd' matched the lines containing a function prototype with that of its definition in c file.

Assignee
Assign to
Reviewer
Request review from
Time tracking
Source branch: cpd-tokens-match