Skip to content

Commit

Permalink
#1294 | Enum values must be all uppercase (ignore _)
Browse files Browse the repository at this point in the history
  • Loading branch information
mlytvyn authored Jan 4, 2025
1 parent 0e7f58a commit baec7c7
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 4 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## [2024.3.4]

### `items.xml` inspection rules
- Enum values must be all uppercase (ignore `_`) [#1294](https://github.com/epam/sap-commerce-intellij-idea-plugin/pull/1294)

## [2024.3.3]

### `CCv2` enhancements
Expand Down
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#
# This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
# Copyright (C) 2019-2024 EPAM Systems <[email protected]> and contributors
# Copyright (C) 2019-2025 EPAM Systems <[email protected]> and contributors
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as
Expand Down Expand Up @@ -45,7 +45,7 @@ intellij.update.since.until.build=true

intellij.plugin.id=com.intellij.idea.plugin.sap.commerce
intellij.plugin.name=SAP-Commerce-Developers-Toolset
intellij.plugin.version=2024.3.3
intellij.plugin.version=2024.3.4
intellij.plugin.since.build=243.21565.193
intellij.plugin.until.build=243.*

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/*
* This file is part of "SAP Commerce Developers Toolset" plugin for IntelliJ IDEA.
* Copyright (C) 2019-2024 EPAM Systems <[email protected]> and contributors
* Copyright (C) 2019-2025 EPAM Systems <[email protected]> and contributors
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as
Expand Down Expand Up @@ -53,7 +53,9 @@ class TSEnumValueMustBeUppercase : AbstractTSInspection() {
severity: HighlightSeverity
) {
val enumName = enumType.code.stringValue ?: return
val code = enumValue.code.stringValue ?: return
val code = enumValue.code.stringValue
?.replace("_", "")
?: return
if (StringUtil.isUpperCase(code)) return

holder.createProblem(
Expand Down

0 comments on commit baec7c7

Please sign in to comment.