The ns-3 Network Simulator Project

Improve the code readability by using check-style.py

ns-3 provides a set of coding guidelines to ensure that the code is easily readable. There are some example programs in the ‘ns-3-dev/examples’ directory that need improvements. A python script called ‘check-style.py’ is available in ‘ns-3-dev/utils’ directory which can be used to improve code readability. In this task, the student is expected to run ‘check-style.py’ on any three example programs from the ‘examples’ directory and submit a patch with improved code for evaluation.

The student is expected to do the following:

  1. Install the ‘uncrustify’ package (which is needed to run check-style.py).
  2. Open terminal in the ‘ns-3-dev/examples’ directory.
  3. Run the following command: ‘./ --level=3 --in-place -f ’
  4. Verify whether the code readability has improved.
  5. Submit the patch files for evaluation.

References:

Task tags

  • code-cleanup
  • examples
  • code-readability

Students who completed this task

SaiMyGuy

Task type

  • code Code
  • done_all Quality Assurance

Level

Beginner
close

2019