DarkPlayer@lemmy.world to Programming@programming.dev · 2 years agoUnicode tricks in pull requests: Do review tools warn us?semanticdiff.comexternal-linkmessage-square4fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1external-linkUnicode tricks in pull requests: Do review tools warn us?semanticdiff.comDarkPlayer@lemmy.world to Programming@programming.dev · 2 years agomessage-square4fedilink
minus-squaremonk@lemmy.unboiled.infolinkfedilinkarrow-up0·2 years agoHomoglyphs? Invisible text? Bidirectional text? Just highlight every line that goes beyond ASCII with yellow warning colors and require to vet it. Maybe make localization data an exception.
minus-squarecbarrick@lemmy.worldcakelinkfedilinkEnglisharrow-up0·2 years agoThis doesn’t work for code bases written in non-English languages. Especially east asian languages. Any line containing an identifier that is also a word would be highlighted. More and more programming languages are supporting unicode identifiers for this use case.
minus-squaremrkite@programming.devlinkfedilinkEnglisharrow-up0·2 years agoSo it won’t work for 0.0001% of all github projects.
minus-squaresndrtj@feddit.nllinkfedilinkarrow-up1·2 years agoI’d suggest to have the occasional look at the “most popular repos” ranking. It’s about 50% Chinese. Super-interesting sometimes as it shows completely different tech trends.
Homoglyphs? Invisible text? Bidirectional text? Just highlight every line that goes beyond ASCII with yellow warning colors and require to vet it. Maybe make localization data an exception.
This doesn’t work for code bases written in non-English languages. Especially east asian languages.
Any line containing an identifier that is also a word would be highlighted.
More and more programming languages are supporting unicode identifiers for this use case.
So it won’t work for 0.0001% of all github projects.
I’d suggest to have the occasional look at the “most popular repos” ranking. It’s about 50% Chinese.
Super-interesting sometimes as it shows completely different tech trends.