# File not ignored

**URL:** <https://community.codecov.com/t/file-not-ignored/1047>\
**Category:** Support\
**Created:** [February 21, 2020, 10:40pm UTC](https://community.codecov.com/t/file-not-ignored/1047 "2020-02-21T22:40:12Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 21, 2020, 10:40pm UTC](https://community.codecov.com/t/file-not-ignored/1047/1 "2020-02-21T22:40:12Z")

</div>

### Description

I have been trying to get a file ignored using the .yml config. It seems to be matching all of the support docs and other answers on this site, but the file continues to be included in code coverage evaluation.

### Repository

Private repo

### Versions

macOS 10.15, Safari 13.0, Codecov 1.1.6

### Additional Information

Recent commit 69276a4e16162263e1ec0711ea5b6f59d7e10c00

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:10pm UTC](https://community.codecov.com/t/file-not-ignored/1047/2 "2020-02-25T21:10:49Z")

</div>

@drazisil In case you’re the one that would investigate this as well, could you take a look and see if there is anything I could do to get this to work properly? Thanks!

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 25, 2020, 9:23pm UTC](https://community.codecov.com/t/file-not-ignored/1047/3 "2020-02-25T21:23:50Z")

</div>

Yep, thanks for the ping. I’ll check the logs tomorrow, could you post or attach the codecov.yml here?

There’s almost a 100% chance something is invalid, my apologies in advance as the validate endpoint is lax, its getting fixed asap.

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:25pm UTC](https://community.codecov.com/t/file-not-ignored/1047/4 "2020-02-25T21:25:11Z")

</div>

Thanks!

```auto
coverage:
  status:
    project:
      default: false # disable the default status that measures entire project
      unitTests:
        target: auto
        paths: "culture-cloud-iosTests/"
      app:
        target: auto
        paths: "culture-cloud-ios/"

ignore:
  - "culture-cloud-iosTests/Matchers.swift"

```

I’ve also tried `- Matchers.swift` for the ignore line, but neither has seemed to work.

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 25, 2020, 9:30pm UTC](https://community.codecov.com/t/file-not-ignored/1047/5 "2020-02-25T21:30:52Z")

</div>

Humor me and try changing the paths to a map, please?

```auto
Path:
  - "something"

```

Edit: I should ask, are you getting the two statuses you expect?

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:32pm UTC](https://community.codecov.com/t/file-not-ignored/1047/6 "2020-02-25T21:32:34Z")

</div>

Yes, I am. But the file `Matchers.swift` continues to be included in the coverage report.

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 25, 2020, 9:34pm UTC](https://community.codecov.com/t/file-not-ignored/1047/7 "2020-02-25T21:34:04Z")

</div>

In that case I’ll probably need to check the logs. I’d be interested if changing the above helps though.

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:35pm UTC](https://community.codecov.com/t/file-not-ignored/1047/8 "2020-02-25T21:35:34Z")

</div>

Just to confirm, you’d like me to change the ignore section to:

```auto
ignore:
 - "Matchers.swift"

```

Is that correct?

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 25, 2020, 9:37pm UTC](https://community.codecov.com/t/file-not-ignored/1047/9 "2020-02-25T21:37:34Z")

</div>

No, the paths under your statuses. I know it seems it’s not related, but right now there are likely two separate processes reading that file and if any part is “bad” it will ignore the whole thing.

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:38pm UTC](https://community.codecov.com/t/file-not-ignored/1047/10 "2020-02-25T21:38:34Z")

</div>

Ok, last sanity check. This should be the new file:

```auto
coverage:
  status:
    project:
      default: false # disable the default status that measures entire project
      unitTests:
        target: auto
        paths: 
          - "culture-cloud-iosTests"
      app:
        target: auto
        paths: 
          - "culture-cloud-ios"

ignore:
  - "culture-cloud-iosTests/Matchers.swift"

```

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 25, 2020, 9:40pm UTC](https://community.codecov.com/t/file-not-ignored/1047/11 "2020-02-25T21:40:15Z")

</div>

I edited it. 😀

Sorry I’m not doing well at explaining, hope that helps.

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:42pm UTC](https://community.codecov.com/t/file-not-ignored/1047/12 "2020-02-25T21:42:29Z")

</div>

Definitely helped. I’ve updated the file, and it’s running through CI now.

Commit hash is `afdf23f3e51a76bc870a000b34c655132ddc5a95`.

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 25, 2020, 9:43pm UTC](https://community.codecov.com/t/file-not-ignored/1047/13 "2020-02-25T21:43:36Z")

</div>

Cool. If that doesn’t work I’ll check the logs tomorrow to see what’s wrong and report back.

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:48pm UTC](https://community.codecov.com/t/file-not-ignored/1047/14 "2020-02-25T21:48:04Z")

</div>

Boom! It worked. One of the diff changes shown for the PR is that the `Matchers` file is now removed. Thanks!

---

<div class="post-metadata">

**Author:** ![drazisil](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/drazisil/32/496_2.png) [@drazisil](https://community.codecov.com/u/drazisil)\
**Post date:** [February 25, 2020, 9:51pm UTC](https://community.codecov.com/t/file-not-ignored/1047/15 "2020-02-25T21:51:44Z")

</div>

Awesome! Thanks for sticking with me, troubleshooting on mobile is a pain 😉

---

<div class="post-metadata">

**Author:** ![benjaminsnorris](https://yyz1.discourse-cdn.com/flex029/user_avatar/community.codecov.com/benjaminsnorris/32/556_2.png) [@benjaminsnorris](https://community.codecov.com/u/benjaminsnorris)\
**Post date:** [February 25, 2020, 9:53pm UTC](https://community.codecov.com/t/file-not-ignored/1047/16 "2020-02-25T21:53:31Z")

</div>

Just in summary, in case someone else finds this issue, the key was to adjust the `codecov.yml` file from this:

```auto
coverage:
  status:
    project:
      default: false # disable the default status that measures entire project
      unitTests:
        target: auto
        paths: "culture-cloud-iosTests/"
      app:
        target: auto
        paths: "culture-cloud-ios/"

```

to instead be this:

```auto
coverage:
  status:
    project:
      default: false # disable the default status that measures entire project
      unitTests:
        target: auto
        paths: 
          - "culture-cloud-iosTests"
      app:
        target: auto
        paths: 
          - "culture-cloud-ios"

```

Without any other changes, the `ignore` section started working properly.
