aboutsummaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* EmptyGlobalAssignment: ignore empty KEYWORDSArthur Zamarin2024-08-011-1/+0
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/695 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* OldPackageNameDep: check for dependency using pkgmoved nameArthur Zamarin2024-07-192-0/+12
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/659 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* VariableOrderWrong: Enforce skel.ebuild variable orderAnthony Ryan2024-01-28351-407/+441
| | | | | | | | | | | | | | | Gentoo developers are rejecting routine version bumps for ebuild variables being defined in a different order than skel.ebuild. This new lint ensures pkgcheck identifies these problems before we waste developer time. Regarding tests, in spite of the massive diff, all that's been done is re-ordering the variables to avoid introducing new style warnings into existing tests. Signed-off-by: Anthony Ryan <anthonyryan1@gmail.com> Closes: https://github.com/pkgcore/pkgcheck/pull/645 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* compatibilty: remove reliance on repo.category_dirsBrian Harring2024-01-239-0/+85
| | | | | | | | | | | | | | pkgcore's `category_dirs` is a fossil that shouldn't be relied upon. My recollection is this property was from before `profiles/categories` existed, but it's just a listdir() intersection against known directories. PMS mandates categories be in `profiles/categories`, thus that functionality breaks compatibility. It will be removed from pkgcore in future semver breaks for that reason. Signed-off-by: Brian Harring <ferringb@gmail.com>
* feat: add check for a category is a fileBrian Harring2024-01-234-0/+4
| | | | | | | | | | | This is beyond corner case, but if someone has a non directory in place of where a category is supposed to be, pkgcore and portage will silently suppress this. Pkgcore will be modified to emit a warning for this, but in the meantime, it's a cheap check, thus add it. Signed-off-by: Brian Harring <ferringb@gmail.com>
* OldPackageName: new check for package named after old package nameArthur Zamarin2024-01-173-0/+8
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/650 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* DependencyMoved: show better error for dependency on pkgmoveArthur Zamarin2024-01-143-0/+12
| | | | | | | | | Catch cases where we depend on pkgmoved package, and instead of showing NonexistentDeps and NonsolvableDepsIn* errors, show DependencyMoved result, with nice and simple suggestion on action to take. Resolves: https://github.com/pkgcore/pkgcheck/issues/649 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* SandboxCallCheck: new check for invalid sandbox callsArthur Zamarin2024-01-143-0/+31
| | | | | | | Catches multiple arguments passed to function, and colon separated path. Resolves: https://github.com/pkgcore/pkgcheck/issues/644 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* UnstatedIuse: check for unstated IUSE in "?" dependenciesArthur Zamarin2024-01-136-2/+15
| | | | | | | | | | | | Check for cases where a dependency uses conditional use dependency with unknown USE flag. PMS states: It is an error for an ebuild to use a conditional use dependency when that ebuild does not have the flag in IUSE_EFFECTIVE. Bug: https://bugs.gentoo.org/921841 Requested-by: Sam James <sam@gentoo.org> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* DeprecatedDep: fix mishandling of slotted deprecatesArthur Zamarin2023-12-106-9/+10
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/642 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* UnusedInherits: add whitelist for weak usage by another eclassArthur Zamarin2023-11-163-0/+32
| | | | | | | | | | Came up as example from elisp eclass, which has automagic calling of functions from readme.gentoo-r1 eclass if they are found in env. While weird, this is legal so let's add a simple whitelist support for this, so it would be simple to extend in future. Reported-by: Ulrich Müller <ulm@gentoo.org> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* BannedEapiCommand: add some extra user/group commandsArthur Zamarin2023-10-053-0/+31
| | | | | | | Add some commands which should never be called in ebuild to the banned list. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* SelfAssignment: fix with new tree-sitter-bashArthur Zamarin2023-10-021-0/+2
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* BannedEapiCommand: check for has_version --host-rootArthur Zamarin2023-10-013-2/+32
| | | | | | | | Catch ``has_version --host-root`` and ``best_version --host-root`` calls, which are not allowed in EAPI>=7. Resolves: https://github.com/pkgcore/pkgcheck/issues/630 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* DuplicateFunctionDefinition: new check for duplicate global functionsArthur Zamarin2023-09-232-0/+23
| | | | | | Closes: https://bugs.gentoo.org/365691 Resolves: https://github.com/pkgcore/pkgcheck/issues/624 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* VariableShadowed: new check to detect shadowed variablesArthur Zamarin2023-09-233-0/+40
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/622 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* BannedPhaseCall: detect calls of phase functions directlyArthur Zamarin2023-09-232-0/+15
| | | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/625 Closes: https://bugs.gentoo.org/596616 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* SelfAssignment: check for global scope self assignmentsArthur Zamarin2023-09-232-0/+26
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/626 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* EmptyGlobalAssignment: check for empty global assignmentsArthur Zamarin2023-09-231-0/+3
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* UnstableSrcUri: check for unstable SRC_URIArthur Zamarin2023-09-013-0/+11
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/510 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* EclassManualDepsCheck: add check for missing manual depsArthur Zamarin2023-09-0115-0/+84
| | | | | | | | When in special modes of eclasses (for example CARGO_OPTIONAL=1), verify specific dependencies are listed somehow in one of the dependencies var. Resolves: https://github.com/pkgcore/pkgcheck/issues/615 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* GlobDistdir: check for glob usage with DISTDIRArthur Zamarin2023-08-302-0/+18
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/605 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* VariableScopeCheck: also check for wrong usage on global scopeArthur Zamarin2023-08-013-2/+9
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/606 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* DeprecatedManifestHash: check for deprecated checksums in Manifest filesArthur Zamarin2023-07-141-0/+1
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/508 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* RepoManifestHashCheck: check for deprecated repo manifest-hashesArthur Zamarin2023-07-142-0/+2
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/508 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* RubyCompatCheck: new check for new USE_RUBY compatible valuesArthur Zamarin2023-06-3012-0/+193
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/304 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* SrcUriFilenameDotPrefix: new check for SRC_URI filenames with dot prefixArthur Zamarin2023-06-244-0/+28
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/585 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* MissingInherits: exclude @USER_VARIABLEsArthur Zamarin2023-06-222-1/+7
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/575 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* RustCheck: check for suboptimal cargo_crate_uris callArthur Zamarin2023-06-216-0/+63
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/586 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* RustCheck: check for suboptimal - CRATES separatorArthur Zamarin2023-06-214-0/+28
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/586 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* StaleLiveCheck: new check for stale live eapiArthur Zamarin2023-05-1411-0/+67
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/578 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* MissingEAPIBlankLine: make it optionalArthur Zamarin2023-04-243-15/+0
| | | | | | | Requested by multiple devs, maybe in future we would improve logic, and un-optional it. Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* MissingEAPIBlankLine: new check for missing blank after EAPIArthur Zamarin2023-04-2152-49/+93
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/570 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* python: Restore filename check in pypi.eclass default caseMichał Górny2023-04-034-0/+38
| | | | | | | | | | | Restore the check for renamed distfile that was accidentally removed while refactoring the code. This prevents suggesting removing SRC_URI when it would cause the distfile rename to be reverted. Fixes: 5704c77f5cabed06be363df78ca03b6e66566a97 Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/pkgcore/pkgcheck/pull/572 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* python: Include PYPI_PN opportunities in PythonInlinePyPIURIMichał Górny2023-03-245-81/+144
| | | | | | | | Fixes #568 Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/pkgcore/pkgcheck/pull/569 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* EbuildReservedCheck: check for semi-reserved namesArthur Zamarin2023-03-032-0/+18
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/536 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* network: add kde-invent remote-idSam James2023-03-024-0/+22
| | | | | | Signed-off-by: Sam James <sam@gentoo.org> Closes: https://github.com/pkgcore/pkgcheck/pull/551 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* checks: Add a check for PyPI URL replacement with pypi.eclassMichał Górny2023-02-1527-0/+700
| | | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Closes: https://github.com/pkgcore/pkgcheck/pull/543 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* python: Generalize Python{GHDistfileSuffix → Fetchable}CheckMichał Górny2023-02-1512-7/+7
| | | | | Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* python: Fix project normalization regex to replace runs of [._-]Michał Górny2023-02-151-1/+1
| | | | | | | | | | Fix the regex used for project normalization to replace runs of consecutive `[._-]` symbols with a single hyphen, rather than every character individually. Adjust the test to verify that it handles these sequences correctly. Signed-off-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* PythonCheck: check for missing scm dep when neededArthur Zamarin2023-02-034-0/+26
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/537 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* PythonPackageNameCheck: update docs & add testsArthur Zamarin2023-01-319-0/+66
| | | | | Follows: 4438566500fdf116ba36c3c407022e89541867d6 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* InvalidMetadataRestrict: check for invalid restricts in metadata.xmlArthur Zamarin2023-01-263-0/+19
| | | | Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ArchesMisSync: check for arch.list <-> arches.desc missyncArthur Zamarin2023-01-203-0/+5
| | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/526 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* UnusedInherits: fix false positives with indirect usageArthur Zamarin2023-01-191-0/+16
| | | | | | Resolves: https://github.com/pkgcore/pkgcheck/issues/355 Resolves: https://github.com/pkgcore/pkgcheck/issues/527 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ProfilesCheck: check missing values for implicit in make.defaultsArthur Zamarin2023-01-162-0/+13
| | | | | Related: https://github.com/pkgcore/pkgcheck/issues/524 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ProfilesCheck: check USE_EXPAND_VALUES_* in make.defaultsArthur Zamarin2023-01-163-0/+16
| | | | | Related: https://github.com/pkgcore/pkgcheck/issues/524 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ProfilesCheck: check for unknown USE_EXPAND_* in make.defaultsArthur Zamarin2023-01-164-0/+37
| | | | | Related: https://github.com/pkgcore/pkgcheck/issues/524 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ProfilesCheck: check for unknown USE & IUSE_IMPLICIT in make.defaultsArthur Zamarin2023-01-153-1/+6
| | | | | Related: https://github.com/pkgcore/pkgcheck/issues/524 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
* ProfilesCheck: check for unknown ARCH in make.defaultsArthur Zamarin2023-01-155-0/+10
| | | | | Related: https://github.com/pkgcore/pkgcheck/issues/524 Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>