mirror of
https://github.com/danog/psalm.git
synced 2024-12-02 09:37:59 +01:00
Add extra level for starter configs
This commit is contained in:
parent
25400e8010
commit
39cdd00094
@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<psalm
|
<psalm
|
||||||
name="Example Psalm config with recommended defaults"
|
|
||||||
useDocblockTypes="true"
|
|
||||||
totallyTyped="true"
|
totallyTyped="true"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<psalm
|
<psalm
|
||||||
name="Example Psalm config with recommended defaults"
|
|
||||||
useDocblockTypes="true"
|
|
||||||
totallyTyped="false"
|
totallyTyped="false"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<psalm
|
<psalm
|
||||||
name="Example Psalm config with recommended defaults"
|
|
||||||
useDocblockTypes="true"
|
|
||||||
totallyTyped="false"
|
totallyTyped="false"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
@ -27,5 +25,7 @@
|
|||||||
|
|
||||||
<DocblockTypeContradiction errorLevel="info" />
|
<DocblockTypeContradiction errorLevel="info" />
|
||||||
<RedundantConditionGivenDocblockType errorLevel="info" />
|
<RedundantConditionGivenDocblockType errorLevel="info" />
|
||||||
|
|
||||||
|
<UnresolvableInclude errorLevel="info" />
|
||||||
</issueHandlers>
|
</issueHandlers>
|
||||||
</psalm>
|
</psalm>
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<psalm
|
<psalm
|
||||||
name="Example Psalm config with recommended defaults"
|
|
||||||
useDocblockTypes="true"
|
|
||||||
totallyTyped="false"
|
totallyTyped="false"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
@ -29,6 +27,8 @@
|
|||||||
<DocblockTypeContradiction errorLevel="info" />
|
<DocblockTypeContradiction errorLevel="info" />
|
||||||
<RedundantConditionGivenDocblockType errorLevel="info" />
|
<RedundantConditionGivenDocblockType errorLevel="info" />
|
||||||
|
|
||||||
|
<UnresolvableInclude errorLevel="info" />
|
||||||
|
|
||||||
<!-- level 4 issues - points to possible deficiencies in logic, higher false-positives -->
|
<!-- level 4 issues - points to possible deficiencies in logic, higher false-positives -->
|
||||||
|
|
||||||
<MoreSpecificReturnType errorLevel="info" />
|
<MoreSpecificReturnType errorLevel="info" />
|
||||||
|
@ -1,7 +1,5 @@
|
|||||||
<?xml version="1.0"?>
|
<?xml version="1.0"?>
|
||||||
<psalm
|
<psalm
|
||||||
name="Example Psalm config with recommended defaults"
|
|
||||||
useDocblockTypes="true"
|
|
||||||
totallyTyped="false"
|
totallyTyped="false"
|
||||||
>
|
>
|
||||||
<projectFiles>
|
<projectFiles>
|
||||||
@ -29,6 +27,8 @@
|
|||||||
<DocblockTypeContradiction errorLevel="info" />
|
<DocblockTypeContradiction errorLevel="info" />
|
||||||
<RedundantConditionGivenDocblockType errorLevel="info" />
|
<RedundantConditionGivenDocblockType errorLevel="info" />
|
||||||
|
|
||||||
|
<UnresolvableInclude errorLevel="info" />
|
||||||
|
|
||||||
<!-- level 4 issues - points to possible deficiencies in logic, higher false-positives -->
|
<!-- level 4 issues - points to possible deficiencies in logic, higher false-positives -->
|
||||||
|
|
||||||
<MoreSpecificReturnType errorLevel="info" />
|
<MoreSpecificReturnType errorLevel="info" />
|
||||||
@ -70,5 +70,6 @@
|
|||||||
<NoInterfaceProperties errorLevel="info" />
|
<NoInterfaceProperties errorLevel="info" />
|
||||||
<TooManyArguments errorLevel="info" />
|
<TooManyArguments errorLevel="info" />
|
||||||
<TypeDoesNotContainType errorLevel="info" />
|
<TypeDoesNotContainType errorLevel="info" />
|
||||||
|
<TypeDoesNotContainNull errorLevel="info" />
|
||||||
</issueHandlers>
|
</issueHandlers>
|
||||||
</psalm>
|
</psalm>
|
||||||
|
90
assets/config_levels/6.xml
Normal file
90
assets/config_levels/6.xml
Normal file
@ -0,0 +1,90 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<psalm
|
||||||
|
totallyTyped="false"
|
||||||
|
>
|
||||||
|
<projectFiles>
|
||||||
|
<directory name="src" />
|
||||||
|
</projectFiles>
|
||||||
|
|
||||||
|
<issueHandlers>
|
||||||
|
<LessSpecificReturnType errorLevel="info" />
|
||||||
|
|
||||||
|
<!-- level 3 issues - slightly lazy code writing, but provably low false-negatives -->
|
||||||
|
|
||||||
|
<DeprecatedMethod errorLevel="info" />
|
||||||
|
|
||||||
|
<MissingClosureReturnType errorLevel="info" />
|
||||||
|
<MissingReturnType errorLevel="info" />
|
||||||
|
<MissingPropertyType errorLevel="info" />
|
||||||
|
<InvalidDocblock errorLevel="info" />
|
||||||
|
<MisplacedRequiredParam errorLevel="info" />
|
||||||
|
|
||||||
|
<PropertyNotSetInConstructor errorLevel="info" />
|
||||||
|
<MissingConstructor errorLevel="info" />
|
||||||
|
<MissingClosureParamType errorLevel="info" />
|
||||||
|
<MissingParamType errorLevel="info" />
|
||||||
|
|
||||||
|
<DocblockTypeContradiction errorLevel="info" />
|
||||||
|
<RedundantConditionGivenDocblockType errorLevel="info" />
|
||||||
|
|
||||||
|
<UnresolvableInclude errorLevel="info" />
|
||||||
|
|
||||||
|
<!-- level 4 issues - points to possible deficiencies in logic, higher false-positives -->
|
||||||
|
|
||||||
|
<MoreSpecificReturnType errorLevel="info" />
|
||||||
|
<TypeCoercion errorLevel="info" />
|
||||||
|
<RedundantCondition errorLevel="info" />
|
||||||
|
|
||||||
|
<PossiblyFalseArgument errorLevel="info" />
|
||||||
|
<PossiblyFalsePropertyAssignmentValue errorLevel="info" />
|
||||||
|
<PossiblyFalseReference errorLevel="info" />
|
||||||
|
<PossiblyInvalidArgument errorLevel="info" />
|
||||||
|
<PossiblyInvalidArrayAccess errorLevel="info" />
|
||||||
|
<PossiblyInvalidArrayAssignment errorLevel="info" />
|
||||||
|
<PossiblyInvalidMethodCall errorLevel="info" />
|
||||||
|
<PossiblyInvalidPropertyAssignment errorLevel="info" />
|
||||||
|
<PossiblyInvalidPropertyAssignmentValue errorLevel="info" />
|
||||||
|
<PossiblyInvalidPropertyFetch errorLevel="info" />
|
||||||
|
<PossiblyNullArgument errorLevel="info" />
|
||||||
|
<PossiblyNullArrayAccess errorLevel="info" />
|
||||||
|
<PossiblyNullArrayAssignment errorLevel="info" />
|
||||||
|
<PossiblyNullArrayOffset errorLevel="info" />
|
||||||
|
<PossiblyNullFunctionCall errorLevel="info" />
|
||||||
|
<PossiblyNullIterator errorLevel="info" />
|
||||||
|
<PossiblyNullOperand errorLevel="info" />
|
||||||
|
<PossiblyNullPropertyAssignment errorLevel="info" />
|
||||||
|
<PossiblyNullPropertyAssignmentValue errorLevel="info" />
|
||||||
|
<PossiblyNullPropertyFetch errorLevel="info" />
|
||||||
|
<PossiblyNullReference errorLevel="info" />
|
||||||
|
<PossiblyUndefinedGlobalVariable errorLevel="info" />
|
||||||
|
<PossiblyUndefinedVariable errorLevel="info" />
|
||||||
|
<PossiblyUndefinedMethod errorLevel="info" />
|
||||||
|
|
||||||
|
<!-- level 5 issues - should be avoided at mosts costs... -->
|
||||||
|
|
||||||
|
<ForbiddenCode errorLevel="info" />
|
||||||
|
<ImplicitToStringCast errorLevel="info" />
|
||||||
|
<InvalidScalarArgument errorLevel="info" />
|
||||||
|
<InvalidToString errorLevel="info" />
|
||||||
|
<MethodSignatureMismatch errorLevel="info" />
|
||||||
|
<NoInterfaceProperties errorLevel="info" />
|
||||||
|
<TooManyArguments errorLevel="info" />
|
||||||
|
<TypeDoesNotContainType errorLevel="info" />
|
||||||
|
<TypeDoesNotContainNull errorLevel="info" />
|
||||||
|
|
||||||
|
<!-- level 6 issues - really bad things -->
|
||||||
|
|
||||||
|
<InvalidNullableReturnType errorLevel="info" />
|
||||||
|
<ImplementedReturnTypeMismatch errorLevel="info" />
|
||||||
|
|
||||||
|
<InvalidReturnStatement errorLevel="info" />
|
||||||
|
<InvalidReturnType errorLevel="info" />
|
||||||
|
<UndefinedThisPropertyAssignment errorLevel="info" />
|
||||||
|
|
||||||
|
<InvalidArgument errorLevel="info" />
|
||||||
|
|
||||||
|
<PossiblyUndefinedMethod errorLevel="info" />
|
||||||
|
<ReservedWord errorLevel="info" />
|
||||||
|
|
||||||
|
</issueHandlers>
|
||||||
|
</psalm>
|
@ -60,7 +60,7 @@ Options:
|
|||||||
|
|
||||||
-i, --init [source_dir=src] [--level=3]
|
-i, --init [source_dir=src] [--level=3]
|
||||||
Create a psalm config file in the current directory that points to [source_dir]
|
Create a psalm config file in the current directory that points to [source_dir]
|
||||||
at the required level, from 1, most strict, to 5, most permissive
|
at the required level, from 1, most strict, to 6, most permissive
|
||||||
|
|
||||||
--debug
|
--debug
|
||||||
Debug information
|
Debug information
|
||||||
|
Loading…
Reference in New Issue
Block a user