* format code and judge categoryPath exisits.