virtual-labs-archive / vlsi-iiith

Other
4 stars 270 forks source link

Expected { after 'if' condition. (curly) #182

Open BSravanthi opened 6 years ago

BSravanthi commented 6 years ago

JavaScript allows the omission of curly braces when a block contains only one statement. However, it is considered by many to be best practice to never omit curly braces around blocks, even when they are optional, because it can lead to bugs and reduces code clarity. So the following:

//Bad
if (foo) foo++;

Please refer to the following link to fix similar issues. https://app.codacy.com/app/BSravanthi/vlsi-iiith/issues?bid=7972124&filters=W3siaWQiOiJMYW5ndWFnZSIsInZhbHVlcyI6W251bGxdfSx7ImlkIjoiQ2F0ZWdvcnkiLCJ2YWx1ZXMiOlsiQ29kZSBTdHlsZSJdfSx7ImlkIjoiTGV2ZWwiLCJ2YWx1ZXMiOltudWxsXX0seyJpZCI6IlBhdHRlcm4iLCJ2YWx1ZXMiOlsxNjYyXX0seyJ2YWx1ZXMiOltdfV0=

Pallavi98 commented 6 years ago

my commit id: 9e67f16

DevikaBoddu commented 6 years ago

valid fix: @Pallavi98

Gowthambhujam commented 6 years ago

Valid fix @pallavi98

VINEETHREDDYSHERI commented 6 years ago

Valid fix @Pallavi98