codelyzer icon indicating copy to clipboard operation
codelyzer copied to clipboard

template-no-call-expression: not reporting failures in specific cases

Open rafaelss95 opened this issue 6 years ago • 2 comments

Reproduction:

{
  "rules": {
    "template-no-call-expression": true
  }
}
@Component({
  template: `
    {{ obj?.nested1() }}
    {{ obj!.nested1() }}
    <!-- Should report two failures, however actually it doesn't report nothing -->
  `
})
class TestComponent {}

rafaelss95 avatar Feb 11 '19 03:02 rafaelss95

@rafaelss95 will try to wok on it, if this is still open. Also first time contributor here, so may need help here.

santoshyadavdev avatar Mar 25 '19 18:03 santoshyadavdev

Also doesn't fail when accessing getters in a template.

 @Component({
  template: '{{ two }}'
})
class TwoComponent {
    get two() {
        return Math.sin(Math.PI/4)^2
    }
}

jaufgang avatar Apr 28 '20 15:04 jaufgang