(#12687) docs: spelling and formatting

This commit is contained in:
Chris Mc
2022-08-30 05:04:33 -07:00
committed by GitHub
parent e2a3684046
commit 304d808ff7
11 changed files with 95 additions and 112 deletions

View File

@@ -1,22 +1,24 @@
Linter to help migration to Conan v2
====================================
# Linter to help migration to Conan v2
<!-- toc -->
## Contents
* [Import ConanFile from `conan`](#import-conanfile-from-conan)
* [Import tools from `conan`](#import-tools-from-conan)<!-- endToc -->
- [Linter to help migration to Conan v2](#linter-to-help-migration-to-conan-v2)
- [Contents](#contents)
- [Import ConanFile from `conan`](#import-conanfile-from-conan)
- [Import tools from `conan`](#import-tools-from-conan)
- [Disable linter for a specific conanfile](#disable-linter-for-a-specific-conanfile)
On our [path to Conan v2](v2_roadmap.md) we are leveraging on custom Pylint rules. This
linter will run for every pull-request that is submitted to the repository and will
raise some warnings and errors that should be addressed in order to migrate the
recipes to Conan v2.
It is important to note that these rules are targetting Conan v2 compatibility layer, their
It is important to note that these rules are targeting Conan v2 compatibility layer, their
purpose is to fail for v1 syntax that will be no longer available in v2. Even if the syntax
if perfectly valid in Conan v1, the recipe might fail here because it is not v2-compliant.
> **Note.-** Some of the errored checks might be just plain Python syntax errors, while
> **Note** Some of the errored checks might be just plain Python syntax errors, while
> others might be related to the custom rules added by us.
Here you can find some examples of the extra rules we are adding:
@@ -64,13 +66,13 @@ Here is a list of different imports and their new equivalent (note that the inte
| conans.errors.ConanInvalidConfiguration | [conan.errors.ConanInvalidConfiguration](https://docs.conan.io/en/latest/migrating_to_2.0/recipes.html#migrating-the-recipes) | 1.47.0 |
| conans.errors.ConanException | [conan.errors.ConanException](https://docs.conan.io/en/latest/migrating_to_2.0/recipes.html#migrating-the-recipes) | 1.47.0 |
# Disable linter for a specific conanfile
## Disable linter for a specific conanfile
If for some reason a conanfile of a recipe or a test_package is not yet prepared to pass
all the checks of the linter, it can be skipped from `pylint` adding the following comment to the file:
**`conanfile.py`**
```python
# pylint: skip-file
from conans import ConanFile, CMake, tools