nimfix.rst 1.6 KB

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