nus-cs2030 / 2021-s2

2 stars 2 forks source link

checkstyle #21

Open xxianhuii opened 3 years ago

xxianhuii commented 3 years ago

hello I am unsure of how to use check style. after running it on my vim, it just shows a series of error codes. am i suppose to decipher what is wrong from each line of code?

nhzaci commented 3 years ago

Yep, correct, you're supposed to decode the errors. If you have issues you could look at #17 or #13 to see if your issue corresponds to those two other issues, else, you could post more information about what's your issue if it's different from those two other issues.

Yung-Jer commented 3 years ago

Yea, basically it will tell you what exactly the error is and which line the error occurs, so you just have to fix the problem and re-run the check style. It will not have any error later if you fix well.

jedkk commented 3 years ago

not sure if it applies to (and hence help) you, but when I first ran the check style, it was full of tabbing problems. I remembered prof suggesting to download the .vimrc file that settles all these issues for you. Otherwise, you can commit to muscle memory to press space at least 4 times (sometimes 8 or depending on your code structure) for every line of code you write.

With regards to issues not related to tabbing, just find the line number in the error message and edit accordingly, then it's settled.