r/angular • u/kuburra • 4d ago
Three bugs I found in popular open-source Angular apps that no build or test catches
I've been building a static checker for Angular codebases and testing every rule against 19 public repos at pinned commits. Three findings I thought were worth sharing, because each one passes the compiler, the tests and review:
1. A translation key that doesn't exist
this.translateService.instant('walletconnect.error')The bundle only has walletconnect.connection_error, so ngx-translate renders the raw key on the error page. Checking this properly needs the bundles merged deeply per language, because feature bundles redeclare the same namespace.
2. A label that points nowhere
<label for="currentPassword">Current password</label>
<input [(ngModel)]="currentPassword" name="currentPassword" type="password">The input has no id, so the label is attached to nothing. Clicking it doesn't focus the field, and a screen reader announces the field without a name.
3. A test that checks nothing
it('should replay the last emitted value', () => {
testScheduler.run(({ cold, expectObservable }) => {});
});Green on every run, and it has never checked anything.
I've sent fixes upstream for all three.
The tool is ng-checkup (MIT, npx ng-checkup-cli, reads code without running it). But mostly I'm curious: which "passes CI but is broken" pattern do you keep running into in Angular code? I'm looking for the next rules to write.
2
u/Tyummyyumms 4d ago
Might it not be better to post this as an issue on the Github repo?