Commit Graph

7 Commits

Author SHA1 Message Date
Uilian Ries
7b1f1a25c8 (#15988) [linter] Do not accept version attribute on regular recipes
* linter: do not accept version attribute

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Fix error number

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* allow system version

Signed-off-by: Uilian Ries <uilianries@gmail.com>

* Add better doc

Signed-off-by: Uilian Ries <uilianries@gmail.com>

---------

Signed-off-by: Uilian Ries <uilianries@gmail.com>
2023-04-02 05:19:26 +02:00
theirix
6f24e01eb9 (#14675) linter: Add error when layouts are missing src_folder in recipe
* Add a style warning to linter for cmake_layout

It is a first pylint warning of this kind.

* Ensure src_folder=src when using built-in layouts

Applied suggestions from code review

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>

* Implement AST checks, rename file

* Drop linter documentation from linters.md

* make the error message more general for different layouts

Co-authored-by: Chris Mc <prince.chrismc@gmail.com>
Co-authored-by: Christopher McArthur <christopherm@jfrog.com>
2022-12-20 06:47:50 +01:00
Javier G. Sogo
04b9350f94 (#12765) [linter] Add rule about importing tools from conan module
* [linter] Add rule about importing tools from conan module

* allow from conan.tools import xxx
2022-09-01 16:45:31 +02:00
Javier G. Sogo
6009a8ef4e (#12330) linter - fix regex matching messages
* linter - testing messages

* second part in brackets is optional

* Override message for E0611

* use cleaner approach for linter

* import both errors

* Error if errors imported

* revert changes in any-lite
2022-08-18 12:04:52 +02:00
Javier G. Sogo
27d78eb31f (#12023) [linter] Add first rule for test_package files
* [linter] Add first rule for test_package files

* add failing test

* revert failing recipe

* typo
2022-08-03 16:05:25 +02:00
Javier G. Sogo
202e85f077 (#11627) linter - check ConanFile import and cross_building
* linter - check ConanFile import and cross_building

* remove unused code

* Add docs

* improve docs

* example - abseil

* md syntax

* revert uneeded changes

* Update docs/v2_linter.md

Co-authored-by: Daniel <danimanzaneque@gmail.com>

Co-authored-by: Daniel <danimanzaneque@gmail.com>
2022-07-13 18:30:09 +02:00
Javier G. Sogo
3365a3ae12 (#11147) [linter] Linter for v2 migration
* [linter] propose linter for v2 migration

* touch

* remove requirements file

* share requirements as string/env variable

* add new line

* cache off

* version range

* exact requirement

* pylint already contains astroid

* Add comment about test_package

* better naming

* remove and rename files
2022-06-13 13:44:37 +02:00