adrienverge / yamllint

A linter for YAML files.
GNU General Public License v3.0
2.9k stars 278 forks source link

Automatically detect character encoding of YAML files and ignore files #630

Open Jayman2000 opened 10 months ago

Jayman2000 commented 10 months ago

This PR makes sure that yamllint never uses open()’s default encoding. Specifically, it uses the character encoding detection algorithm specified in chapter 5.2 of the YAML spec when reading both YAML files and files that are on the ignore-from-file list.

There are two other PRs that are similar to this one. Here’s how this PR compares to those two:

Fixes #218. Fixes #238. Fixes #347. Closes #240. Closes #581.

coveralls commented 10 months ago

Coverage Status

coverage: 99.835% (+0.01%) from 99.825% when pulling aeabade02eebc30a0e2937224af7f26f0a9ce0bf on Jayman2000:auto-detect-encoding into f0c0c7586b97809289bdcfe83a66363330b645d8 on adrienverge:master.

Jayman2000 commented 9 months ago

I just noticed that one of the checks for this PR is failing. The coverage for yamllint/config.py went down, but that’s just because the total number relevant lines went down. There’s only two lines that aren’t covered, but those same two lines aren’t covered in the master branch. Is there anything that I need to do here?

adrienverge commented 9 months ago

Is there anything that I need to do here?

At the moment, no. I'm sorry, please excuse the delay, this is a big change with much impact, I need a large time slot to review this, which I couldn't find yet.