文件名称:Facebook代码分析工具Codemod.zip
文件大小:22KB
文件格式:ZIP
更新时间:2022-08-06 22:26:02
开源项目
Codemod 是一个工具/库,它可以帮你处理那些只有部分自动化功能,部分场合还需人工干预的大规模代码库。示例代码:-m Have regex work over multiple lines (e.g. have dot match newlines). By default, codemod applies the regex one line at a time. -d The path whose ancestor files are to be explored. Defaults to current dir. --start A path:line_number-formatted position somewhere in the hierarchy from which to being exploring, or a percentage (e.g. "--start 25%") of the way through to start. Useful if you're divvying up the substitution task across multiple people. --end A path:line_number-formatted position somewhere in the hierarchy just *before* which we should stop exploring, or a percentage of the way through, just before which to end. --extensions A comma-delimited list of file extensions to process. --include-extensionless If set, this will check files without an extension, along with any matching file extensions passed in --extensions --accept-all Automatically accept all changes (use with caution) --editor Specify an editor, e.g. "vim" or "emacs". If omitted, defaults to $EDITOR environment variable. --count Don't run normally. Instead, just print out number of times places in the codebase where the 'query' matches. --test Don't run normally. Instead, just run the unit tests embedded in the codemod library. 标签:Codemod
【文件预览】:
codemod-master
----CONTRIBUTING.md(1KB)
----.travis.yml(117B)
----pytest.ini(69B)
----LICENSE(10KB)
----setup.py(921B)
----README.md(6KB)
----Makefile(341B)
----CODE_OF_CONDUCT.md(241B)
----codemod()
--------helpers.py(3KB)
--------base.py(18KB)
--------__init__.py(35B)
--------patch.py(3KB)
--------terminal_helper.py(3KB)
--------query.py(8KB)
--------position.py(2KB)
----.gitignore(797B)
----dev-requirements.txt(16B)