我有一个PMD规则集,其中包含指定属性的以下规则,以便忽略Eclipse自动生成的<div class="post">
<div class="div">
<div class="postCategory">
</div>
@if($link)
<a href="/post/{{ $post->id }}"><h2>{{ $post->title }}</h2></a>
@else
<h2>{{ $post->title }}</h2>
@endif
<p>{!! $post->body !!}</p>
<p>{{ $post->category->name }}</p>
<p>Posted by <a href="/user/{{ $post->user->username }}">{{ $post->user->username }}</a> at {{ $post->created_at }}</p>
@if(Auth::check())
@if($post->user->username == Auth::user()->username || Auth::user()->isAdmin)
{!! Form::open(['method' => 'delete', 'route' => ['post.destroy', $post->id]]) !!}
<input type="submit" value="Delete Post" onclick="return confirm('Are you sure?')"></input>
{!! Form::close() !!}
@endif
@endif
</div>
</div>
和equals
方法的任何违规。
hashCode
理想情况下,我希望在规则之间共享属性以避免重复。特别是因为我计划为各种圈复杂度规则添加相同的属性。
在PMD规则集中是否有对此的支持?