nimfix.rst 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. =====================
  2. Nimfix User Guide
  3. =====================
  4. :Author: Andreas Rumpf
  5. :Version: |nimversion|
  6. **WARNING**: Nimfix is currently beta-quality.
  7. Nimfix is a tool to help you upgrade from Nimrod (<= version 0.9.6) to
  8. Nim (=> version 0.10.0).
  9. It performs 3 different actions:
  10. 1. It makes your code case consistent.
  11. 2. It renames every symbol that has a deprecation rule. So if a module has a
  12. rule ``{.deprecated: [TFoo: Foo].}`` then ``TFoo`` is replaced by ``Foo``.
  13. 3. It can also check that your identifiers adhere to the official style guide
  14. and optionally modify them to do so (via ``--styleCheck:auto``).
  15. Note that ``nimfix`` defaults to **overwrite** your code unless you
  16. use ``--overwriteFiles:off``! But hey, if you do not use a version control
  17. system by this day and age, your project is already in big trouble.
  18. Installation
  19. ------------
  20. Nimfix is part of the compiler distribution. Compile via::
  21. nim c compiler/nimfix/nimfix.nim
  22. mv compiler/nimfix/nimfix bin
  23. Or on windows::
  24. nim c compiler\nimfix\nimfix.nim
  25. move compiler\nimfix\nimfix.exe bin
  26. Usage
  27. -----
  28. Usage:
  29. nimfix [options] projectfile.nim
  30. Options:
  31. --overwriteFiles:on|off overwrite the original nim files. DEFAULT is ON!
  32. --wholeProject overwrite every processed file.
  33. --checkExtern:on|off style check also extern names
  34. --styleCheck:on|off|auto performs style checking for identifiers
  35. and suggests an alternative spelling;
  36. 'auto' corrects the spelling.
  37. In addition, all command line options of Nim are supported.