1
0
mirror of https://github.com/danog/psalm.git synced 2024-12-13 17:57:37 +01:00
Commit Graph

65 Commits

Author SHA1 Message Date
Matthew Brown
5384f193d1 Allow class and method issues to be suppressed by their identifiers
Ref #603
2018-03-20 22:36:03 -04:00
Matthew Brown
5068981902 Show info suppression instructions in output 2018-03-18 18:27:10 -04:00
Matthew Brown
303e3bbf0f Fix #590 - add error count to stdout 2018-03-18 18:04:50 -04:00
Matthew Brown
cc9ffb36d9 Actually suppress child issues 2018-03-18 17:26:28 -04:00
Matthew Brown
d7a585160f Add more granular error messages for invalid operands 2018-03-18 16:39:34 -04:00
Matthew Brown
e61815bb72 Fix #458 - fully support optional array keys 2018-03-17 18:05:50 -04:00
Matt Brown
f806e16c10 Fix #516 - never show issues when finding references 2018-03-16 11:15:07 -04:00
Matt Brown
5471b89391 Make array coercion an error 2018-02-21 18:59:31 -05:00
Tyson Andre
cdcec69536 Support the pylint output format
This is a compact output format that is easy to write scripts that parse.
(And errors fit on a single line)

- E.g. jenkins violation plugin works reliably with pylint.

The multi-line details are deliberately omitted.
An application can output 'console' to stdout and to
a pylint file at the same time.

Files with the extension .pylint will use this format.

Document the emacs and pylint output formats in `psalm --help`

An optional followup task would be to create unique issue codes,
I don't have any use cases for that.
2018-02-19 22:35:48 -05:00
Matthew Brown
a99e89495b Add end line/column data for LSP support 2018-02-19 18:16:09 -05:00
Matthew Brown
beb4993736 Add more text feedback when running from command line 2018-02-06 01:11:33 -05:00
Matthew Brown
0c23c59820 Improve formatting of end message 2018-02-04 12:34:22 -05:00
Matthew Brown
8e0998e081 Break apart the Codebase class 2018-02-03 18:56:54 -05:00
Matt Brown
3d6bb23e28 Add stats breakdown for files 2018-01-31 17:09:09 -05:00
Matt Brown
fc805a926e Add code coverage message at the end of a scan 2018-01-31 16:08:52 -05:00
Matthew Brown
b68611c156 Fix #474 - change text colour of info text 2018-01-28 18:44:58 -05:00
Matt Brown
b0f3992f36 Remove stopOnFirstError config option, because it hasn’t worked for a while
Fixes #248
2018-01-24 16:22:54 -05:00
Matthew Brown
bc9761f6c9 Create Codebase out from ProjectChecker 2018-01-21 13:45:33 -05:00
Tyson Andre
77b41f4e9f Bring phpdoc @param up to date 2018-01-18 16:07:48 -05:00
Matthew Brown
49981f63c6 Be less alarmist info issues, colour-wise 2018-01-10 23:29:46 -05:00
Matt Brown
1a048040bf Move IssueBuffer finish logic into the command line 2018-01-09 11:49:10 -05:00
Matthew Brown
5bae869dc6 Break file manipulation out into Psalter 2018-01-07 17:25:23 -05:00
Matt Brown
796a3c5066 Fix style issues 2018-01-07 17:25:23 -05:00
Matt Brown
928b01a7c7 Find and fix code issues where functionality is available 2018-01-07 17:25:23 -05:00
Matthew Brown
8efc939a5f Move Psalm execution code into PHP file that Psalm can analyse 2017-12-29 17:02:56 -05:00
Matthew Brown
7fb1b476c7 Sort results from multi-threaded execution 2017-12-10 11:22:36 -05:00
MacFJA
a38c36c597 Always generate report files, even if no errors and warnings 2017-10-02 07:38:22 -04:00
MacFJA
c4ce8bede9 Add XML as possible output format + add report generation (#206)
* Add XML as possible output format + add report generation

* Add missing xml root node

* Change XML generator (previous one don't escape '<' and '>')

* Change option (only one option) + unit test
2017-09-08 11:18:48 -04:00
Matthew Brown
4175295113 Isolate where we load static storage objects (#195)
* Move FileChecker::$storage calls to provider

* Add ClassLikeStorageProvider

* Use ClassLikeStorageProvider everywhere

* Move storage arrays into providers
2017-07-29 15:05:06 -04:00
Matthew Brown
e29dd140e3 Refactor scanning and analysis, introducing multithreading (#191)
* Add failing test

* Add visitor to soup up classlike references

* Move a whole bunch of code into the visitor

* Move some methods back, move onto analysis stage

* Use the getAliases method everywhere

* Fix refs

* Fix more refs

* Fix some tests

* Fix more tests

* Fix include tests

* Shift config class finding to project checker and fix bugs

* Fix a few more tests

* transition test to new syntax

* Remove var_dump

* Delete a bunch of code and fix mutation test

* Remove unnecessary visitation

* Transition to better mocked out file provider, breaking some cached statement loading

* Use different scheme for naming anonymous classes

* Fix anonymous class issues

* Refactor file/statement loading

* Add specific property types

* Fix mapped property assignment

* Improve how we deal with traits

* Fix trait checking

* Pass Psalm checks

* Add multi-process support

* Delay console output until the end

* Remove PHP 7 syntax

* Update file storage with classes

* Fix scanning individual files and add reflection return types

* Always turn XDebug off

* Add quicker method of getting method mutations

* Queue return types for crawling

* Interpret all strings as possible classes once we see a `get_class` call

* Check invalid return types again

* Fix template namespacing issues

* Default to class-insensitive file names for includes

* Don’t overwrite existing issues data

* Add var docblocks for scanning

* Add null check

* Fix loading of external classes in templates

* Only try to populate class when we haven’t yet seen it’s not a class

* Fix trait property accessibility

* Only ever improve docblock param type

* Make param replacement more robust

* Fix static const missing inferred type

* Fix a few more tests

* Register constant definitions

* Fix trait aliasing

* Skip constant type tests for now

* Fix linting issues

* Make sure caching is off for tests

* Remove unnecessary return

* Use emulative parser if on PHP 5.6

* Cache parser for faster first-time parse

* Fix constant resolution when scanning classes

* Remove test that’s beyond a practical scope

* Add back --diff support

* Add --help for --threads

* Remove unused vars
2017-07-25 16:11:02 -04:00
Matthew Brown
368b6670d7 Fix a few edgecases 2017-06-29 00:28:37 -04:00
Matthew Brown
22a716f4da Improve formatting of phpdocs 2017-05-26 20:16:18 -04:00
Matthew Brown
d6909193ea Add additional formatting changes 2017-05-26 20:05:57 -04:00
SignpostMarv
adef59629a scrutinizer-ci (#152)
* swapping phpcs for php-cs-fixer

* workaround for php-cs-fixer treating parenthesis following echo as the function call variant

* amending rules

* blank_line_before_return

* majority of files pass with these disabled, could remove later

* combine_consecutive_unsets

* concat_space

* placeholder for if vimeo/psalm ever goes php:^7.0

* function_to_constant

* disabling include

* linebreak_after_opening_tag, lowercase_cast, magic_constant_casing

* mb_str_functions disabled

* method_separation

* native_function_casing

* native_function_invocations

* new_with_braces disabled to match usage

* no_alias_functions

* no_blank_lines_after_class_opening

* no_blank_lines_after_phpdoc

* no_blank_lines_before_namespace

* no_empty_comment

* no_empty_phpdoc

* no_empty_statement

* no_extra_consecutive_blank_lines

* no_leading_import_slash to discuss

* no_leading_namespace_whitespace

* no_mixed_echo_print

* no_multiline_whitespace_around_double_arrow

* no_multiline_whitespace_before_semicolons

* no_php4_constructor

* no_short_bool_cast

* no_short_echo_tag

* no_singleline_whitespace_before_semicolons

* no_spaces_around_offset

* no_trailing_comma_in_list_call

* no_trailing_comma_in_singleline_array

* no_unneeded_control_parentheses to discuss

* no_unreachable_default_argument_value

* no_unused_imports to discuss

* no_useless_else to discuss

* no_useless_return

* no_whitespace_before_comma_in_array

* no_whitespace_in_blank_line

* non_printable_character

* normalize_index_brace

* ordered_class_elements to discuss

* ordered_imports to discss

* php_unit_construct

* php_unit_dedicate_assert

* php_unit_fqcn_annotation

* php_unit_strict to discuss

* php_unit_test_class_requires_covers to discuss

* phpdoc_add_missing_param_annotation

* phpdoc_align to discuss

* phpdoc_annotation_without_dot to discuss

* phpdoc_indent to discuss

* phpdoc_inline_tag

* phpdoc_no_access

* phpdoc_no_alias_tag

* phpdoc_no_empty_return

* phpdoc_no_package

* phpdoc_no_useless_inheritdoc

* phpdoc_order to discuss

* phpdoc_return_self_reference

* phpdoc_scalar to discuss

* phpdoc_separation to discuss

* phpdoc_single_line_var_spacing

* phpdoc_summary to discuss

* phpdoc_to_comment to discuss

* phpdoc_trim to discuss

* phpdoc_types

* phpdoc_var_without_name

* pow_to_exponentiation

* pre_increment to discuss

* protected_to_private

* psr0 turned off

* psr4 turned on

* random_api_migration

* return_type_declaration to discuss

* self_accessor to discuss

* semicolon_after_instruction

* short_scalar_cast

* silenced_deprecation_error turned off

* simplified_null_return to discuss

* single_quote

* space_after_semicolon

* standardize_not_equals

* strict_comparison to discuss

* strict_param to discuss

* ternary_operator_spaces

* ternary_to_null_coalescing should be set to true if vimeo/psalm ever goes php:^7.0

* trailing_comma_in_multiline_array to discuss

* trim_array_spaces

* unary_operator_spaces

* whitespace_after_comma_in_array to discuss

* multi-version scrutinizer to match travis

* binary_operator_space

* not the best solution, but it works to exclude the call map from php-cs-fixer

* reducing verbosity of config where defaults were used

* dry run php-cs-fixer as part of tests

* disabling rule pending FriendsOfPHP/PHP-CS-Fixer#2739

* enabling no_unused_imports

* enabling ordered_imports

* ignoring user-defined .php_cs

* using $TRAVIS_COMMIT_RANGE to only test modified files

* enabling no_leading_import_slash

* conditionally testing everything

* filter output then perform exact match

* restoring phpcs via partial cherry pick of f65c618
2017-05-26 18:26:14 -04:00
Matthew Brown
4fd46e1752 Improve formatting 2017-05-24 22:07:49 -04:00
Matthew Brown
a89018d9ae Only warn about issues in files that we’re trying to scan 2017-03-24 18:34:46 -04:00
Matt Brown
3d2be3410e Infer loop types without @var comments 2017-03-13 18:06:56 -04:00
Matthew Brown
e61ea17db5 Move FileChecker functionality into separate, better-contained classes 2017-02-18 13:41:27 -05:00
Matthew Brown
e75436fdc7 Fix reporting level grab 2017-02-12 13:38:41 -05:00
Matthew Brown
f32fabd798 Remove dead code 2017-02-11 19:30:06 -05:00
Matthew Brown
ec65f31aaa Improve dead code analysis and fix errors found 2017-02-02 00:20:58 -05:00
Matthew Brown
e3a9cb98c3 Add extra issue for invalid clone and fix issue reporting; 2017-01-16 12:59:09 -05:00
Matthew Brown
0deccccdbb Add emacs-compatible report format 2017-01-15 22:39:26 -05:00
Matthew Brown
804de9f215 Fix #51 - don't exit with non-zero code if no errors reported 2017-01-14 01:24:27 -05:00
Matthew Brown
6ee69e547f Do more to separate out processing steps 2017-01-06 01:07:11 -05:00
Matthew Brown
7609ca02c0 Fix #32 by evaluating all class references in files lazily 2017-01-04 23:42:58 -05:00
Matthew Brown
685eaeb4fe Reimagine XML schema, fixes #21 2016-12-29 20:10:06 -05:00
Matthew Brown
1007d1682c Fix mixed operand issues 2016-12-24 18:29:11 +00:00
Matthew Brown
9746c8972f Fix MixedAssignment errors 2016-12-17 00:48:31 -05:00
Matt Brown
587e067567 Fix start time ref 2016-12-14 19:43:20 -05:00