Skip to content

check_src_filters flag behaviour interferes with other settings #4788

Description

@Strooom

[x] PlatformIO Core.

Configuration

Operating system : Win64 v11
PlatformIO Version (platformio --version) : 6.1.11

Description of problem

when using a check_src_filters flag this works only when there is only one environment. As soon as a second [env] is created, the cppcheck only checks the files in folder 'src'

Steps to Reproduce

  1. set up a simple, single [env] and configure the static code checking
[env:native]
platform = native
check_tool = cppcheck
check_flags = --enable=all
check_src_filters = 
    +<test/test_*/*>
    +<src/*>

run pio check --environment native and it works, checking code in src and test folders

now add a second environment [env:another]

[env:another]

[env:native]
platform = native
check_tool = cppcheck
check_flags = --enable=all
check_src_filters = 
    +<test/test_*/*>
    +<src/*>

run pio check --environment native and it will only check source in 'src', no longer in test folders

Actual Results

does not include files in folders set by check_src_filters

Expected Results

should include files in folders set by check_src_filters, independent of how many environments there are or settings in unselected environments

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions