LoVisual/combatant-client-26.2/config/pmd/ruleset.xml
loki5512344 ec10395511 chore(history): squash 15 commit(s) from 2026-09-22
- refactor(mixins): разбивка render/entity (crystal/item) и render/level/particles — регресс 8.5.1
- refactor(structure): разбивка 10 папок >4 файлов — регресс 8.5.1 после Фаз 7/10
- refactor(ui): OrderedUiBatcher 944 → 188 + 8 хелперов ≤200 (8.5.2, гейт 9.2)
- refactor(text): MsdfFont 613 → 163 + atlas/ (Atlas,AtlasLoader,Json,Glyph) + GlyphDrawer 179 (8.5.2, гейт 9.2)
- refactor(text): CustomTextRenderer 540 → 235 + CustomFontSet 142 + GradientTexts 95 + HorizontalFade 77 (8.5.2, гейт 9.2)
- refactor(buttons): BetterButtons 1033 → 388 + 7 хелперов ≤200 (8.5.2, гейт 9.2)
- refactor(inventory): удалить InventorySwap 1038 + ShitDropper → ShitESP (Вариант A)
- fix(shitesp): цвет через color() helper как у ESP/Chams (крутой пиккер)
- fix(blockesp): камень→спавнер подсвечивается сразу, docs: DEV_GUIDE + DEVELOPMENT → один гайд
- docs(dev-guide): дополнен §18 современными правилами (web-поиск 2025-2026)
- chore(quality): PMD 7.27.0 + Checkstyle 14.1.0 + SpotBugs 6.5.11 + обновы зависимостей
- refactor(svg): SvgMeshBackend 1020 → 611 + SvgParser 181 + SvgGeometry 173 (8.5.2)
- refactor(svg): SvgMeshBackend 611 → 267 + SvgTexture 223 + SvgRender 35 + SvgCache 25 (8.5.2)
- refactor(theme): Themes 1012 → 562 + 3×163 пресета (8.5.2)
- refactor(particles): WorldParticles 999 → 821 + geometry 93 + sphere 67 (8.5.2)
2026-09-22 20:33:03 +02:00

63 lines
2.9 KiB
XML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?xml version="1.0"?>
<ruleset name="LoVisual"
xmlns="http://pmd.sourceforge.net/ruleset/2.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://pmd.sourceforge.net/ruleset/2.0.0 https://pmd.sourceforge.io/ruleset_2_0_0.xsd">
<description>LoVisual — bestpractices/errorprone/performance/security + проектные правила 200/4</description>
<!-- Базовые категории PMD 7.27.0 -->
<rule ref="category/java/bestpractices.xml"/>
<rule ref="category/java/errorprone.xml"/>
<rule ref="category/java/performance.xml"/>
<rule ref="category/java/security.xml"/>
<!-- Файл ≤200 строк: через ExcessiveClassLength (класс ≈ файл) -->
<rule ref="category/java/design.xml/ExcessiveClassLength">
<properties>
<property name="minimum" value="200"/>
</properties>
</rule>
<!-- Кастом: System.currentTimeMillis → GameClock.millis() -->
<rule name="SystemCurrentTimeMillisUsage"
language="java"
message="Используй GameClock.millis() вместо System.currentTimeMillis() в модулях"
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>Модули должны использовать игровое время GameClock.millis(), не стенное.</description>
<priority>2</priority>
<properties>
<property name="xpath">
<value><![CDATA[
//PrimaryExpression[PrimaryPrefix/Name[@Image='System.currentTimeMillis']]
]]></value>
</property>
</properties>
</rule>
<!-- Кастом: static Minecraft в полях -->
<rule name="StaticMinecraftField"
language="java"
message="Не храни static Minecraft в поле — только локально Minecraft.getInstance()"
class="net.sourceforge.pmd.lang.rule.XPathRule">
<description>Никакого static final Minecraft в полях (правило проекта).</description>
<priority>2</priority>
<properties>
<property name="xpath">
<value><![CDATA[
//FieldDeclaration[@Static='true'][.//Type//Name[@Image='Minecraft']]
]]></value>
</property>
</properties>
</rule>
<!-- Пустые блоки / пустышки -->
<rule ref="category/java/codestyle.xml/EmptyCatchBlock"/>
<rule ref="category/java/codestyle.xml/EmptyIfStmt"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateMethod"/>
<rule ref="category/java/bestpractices.xml/UnusedPrivateField"/>
<!-- Исключения: сгенерированные, миксины, Faust -->
<exclude-pattern>.*/build/.*</exclude-pattern>
<exclude-pattern>.*/src/main/resources/.*</exclude-pattern>
</ruleset>