Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
e35012c5
Commit
e35012c5
authored
2 years ago
by
Jan-Hendrik Willms
Committed by
Jan-Hendrik Willms
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
update rector config
parent
6417e79a
Branches
rector
No related tags found
1 merge request
!9
Draft: Rector
Pipeline
#22525
passed
10 months ago
Stage: build
Stage: checks
Stage: analyse
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
rector.php
+19
-15
19 additions, 15 deletions
rector.php
with
19 additions
and
15 deletions
rector.php
+
19
−
15
View file @
e35012c5
<?php
declare
(
strict_types
=
1
);
use
Rector\Core\Configuration\Option
;
use
Rector\Core\ValueObject\PhpVersion
;
use
Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator
;
use
Rector\Config\RectorConfig
;
use
Rector\Set\ValueObject\SetList
;
return
static
function
(
ContainerConfigurator
$containe
rConfig
urator
):
void
return
static
function
(
RectorConfig
$recto
rConfig
):
void
{
$services
=
$containerConfigurator
->
services
();
$parameters
=
$containerConfigurator
->
parameters
();
$containerConfigurator
->
import
(
__DIR__
.
'/resources/rectors/sets/studip-5.0.php'
);
$parameters
->
set
(
Option
::
PHP_VERSION_FEATURES
,
PhpVersion
::
PHP_
72
);
$parameters
->
set
(
Option
::
ENABLE_EDITORCONFIG
,
true
);
//
$services = $containerConfigurator->services();
//
$parameters = $containerConfigurator->parameters();
//
//
$containerConfigurator->import(__DIR__ . '/resources/rectors/sets/studip-5.0.php');
//
//
$parameters->set(Option::PHP_VERSION_FEATURES, PhpVersion::PHP_
80
);
//
$parameters->set(Option::ENABLE_EDITORCONFIG, true);
// $containerConfigurator->import(SetList::DEAD_CODE);
// $containerConfigurator->import(SetList::CODE_QUALITY);
...
...
@@ -32,11 +30,17 @@ return static function (ContainerConfigurator $containerConfigurator): void
// $services->set(\Rector\Php73\Rector\BooleanOr\IsCountableRector::class);
// $services->set(\Rector\CodeQuality\Rector\Array_\ArrayThisCallToThisMethodCallRector::class);
$parameters
->
set
(
Option
::
PHPSTAN_FOR_RECTOR_PATH
,
__DIR__
.
'/phpstan.neon'
);
$parameters
->
set
(
Option
::
PATHS
,
[
$rectorConfig
->
phpstanConfig
(
__DIR__
.
'/phpstan.neon.dist'
);
$rectorConfig
->
sets
([
SetList
::
DEAD_CODE
,
SetList
::
PHP_80
,
]);
$rectorConfig
->
paths
([
getcwd
()
.
'/app/controllers'
,
// getcwd() . '/db/migrations',
getcwd
()
.
'/lib'
,
getcwd
()
.
'/public/plugins_packages/core'
,
//
getcwd() . '/public/plugins_packages/core',
]);
};
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment