Skip to content

Conversation

@Hidanio
Copy link
Contributor

@Hidanio Hidanio commented Jul 25, 2024

  • added new linter rule: declareStrictTypes can not be "0"
  • added quickFix for declareStrictTypes
  • added new linter rule: lack of declare(strict_types=1) section
  • added quickFix for lack of declare(strict_types=1) section

@Hidanio Hidanio added the enhancement New feature or request label Jul 25, 2024
@Hidanio Hidanio requested a review from Danil42Russia July 25, 2024 15:17
@Hidanio Hidanio self-assigned this Jul 25, 2024
@Hidanio Hidanio force-pushed the linter_declare_strict branch from 64b7ffb to f83f419 Compare July 25, 2024 15:17
strictMixed bool
strictTypes bool
strictMixed bool
declareSection bool
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I propose to do it differently. We have an ir.Root node that describes the entire file. Essentially, we can check if there is an ir.DeclareStmt at its level, and if there is, show an error.

see block.go

},

{
Name: "notStrictTypes",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's split the checks into two different MRs, shall we?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants