package Ġcom . a em tools . inspection . html Ċ Ċ import Ġcom . a em tools . common . constant . const Ċ import Ġcom . a em tools . common . util . has Child Ċ import Ġcom . a em tools . inspection . common . A em Int ellij Inspection Ċ import Ġcom . a em tools . inspection . service . I Inspection Service Ċ import Ġcom . a em tools . inspection . service . with Services Ċ import Ġcom . a em tools . lang . ht l . psi . H tl Context Expression Ċ import Ġcom . a em tools . lang . ht l . psi . H tl H tl El Ċ import Ġcom . a em tools . lang . ht l . psi . H tl Property Access Ċ import Ġcom . a em tools . lang . ht l . psi . H tl StringLiteral Ċ import Ġcom . a em tools . lang . ht l . psi . mixin . H tl El Expression Mixin Ċ import Ġcom . a em tools . lang . ht l . psi . visitor . H tl Element Visitor Ċ import Ġcom . a em tools . lang . util . is Inside Of Ċ import Ġcom . intellij . code Inspection . Problems Holder Ċ import Ġcom . intellij . psi . Psi Element Visitor Ċ Ċ /** Ċ Ġ* Ġ@ author ĠD my tro ĠPrim sh y ts Ċ Ġ*/ Ċ class ĠRed undant El Inspection Ġ: ĠA em Int ellij Inspection ( ĊĠĠĠ ĠgroupName Ġ= Ġ" HT L ", ĊĠĠĠ Ġname Ġ= Ġ" Red undant ĠHT L Ġexpression ", ĊĠĠĠ Ġdescription Ġ= Ġ""" ĊĠĠĠĠĠ ĠThis Ġinspection Ġchecks Ġif ĠHT L Ġexpression Ġis Ġused Ġin Ġ` data - s ly - use ` Ġor Ġ` data - s ly - include ` Ġattributes ĊĠĠĠĠĠ Ġwithout Ġreason . ĠExpression Ġmay Ġbe Ġrequired Ġin Ġcase Ġif Ġthere Ġis Ġnecess ity Ġto Ġpass Ġsome Ġarguments ĊĠĠĠĠĠ Ġvia Ġ" option " Ġarguments , Ġotherwise Ġexpression Ġis Ġredundant ĊĠĠĠ Ġ""" . trim Indent () Ċ ) Ġ{ ĊĠ Ġoverride Ġfun Ġbuild Visitor ( holder : ĠPro blems Holder , Ġis On The Fly : ĠBoolean ): ĠPsi Element Visitor Ġ{ ĊĠĠĠ Ġreturn Ġobject Ġ: ĠH tl Element Visitor () Ġ{ ĊĠĠĠĠĠ Ġoverride Ġfun Ġvisit H tl Expression ( ht l Expression : ĠH tl El Expression Mixin ) Ġ{ ĊĠĠĠĠĠĠĠ Ġwith Services ( ht l Expression . project ) Ġ{ Ġservice : ĠI Inspection Service Ġ-> ĊĠĠĠĠĠĠĠĠĠ Ġif Ġ( has Defect ( ht l Expression )) Ġ{ ĊĠĠĠĠĠĠĠĠĠĠĠ Ġservice . report Red undant El ( ht l Expression , Ġholder ) ĊĠĠĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠĠĠ Ġ} ĊĠĠĠĠĠ Ġ} ĊĠĠĠ Ġ} ĊĠ Ġ} ĊĊĠ Ġprivate Ġfun Ġhas Defect ( element : ĠH tl El Expression Mixin ): ĠBoolean Ġ= ĊĠĠĠĠĠ Ġelement . is D umb StringLiteral El () ĊĠĠĠĠĠĠĠĠĠ Ġ&& Ġ( element . is Inside Of ( const . ht l . DATA _ SL Y _ USE ) Ġ|| Ġelement . is Inside Of ( const . ht l . DATA _ SL Y _ INCLUDE )) ĊĊĠ Ġ/** ĊĠĠ Ġ* ĠCheck Ġif Ġcurrent Ġcurrent Ġ[ H tl H tl El ] Ġis Ġa Ġ" D umb ĠString ĠLiteral ", Ġwhich Ġmean ĊĠĠ Ġ* Ġthat Ġthe Ġexpression Ġdoesn 't Ġcontain Ġanything Ġexcept Ġthe Ġstring Ġliteral , Ġe . g .: ĊĠĠ Ġ* Ġ``` ĊĠĠ Ġ* ĠĠ Ġ${ ' static Ġstring '} ĊĠĠ Ġ* Ġ``` ĊĠĠ Ġ*/ ĊĠ Ġprivate Ġfun ĠH tl El Expression Mixin . is D umb StringLiteral El (): ĠBoolean Ġ= ĊĠĠĠĠĠ Ġthis . has Child ( H tl StringLiteral :: class . java ) ĊĠĠĠĠĠĠĠĠĠ Ġ&& Ġ! this . has Child ( H tl Property Access :: class . java ) ĊĠĠĠĠĠĠĠĠĠ Ġ&& Ġ! this . has Child ( H tl Context Expression :: class . java ) Ċ } ĊĊ