Skip to content

Commit 0852afb

Browse files
authored
Order of arguments good practise (#3760)
* Order of arguments good practise * Add also note about using = when adding values to named args * Rewording
1 parent ae45608 commit 0852afb

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

knowledge/guidelines.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,10 @@ Good practices
4343
the graph to avoid the conflicts without overrides and forces is the recommended approach.
4444
- **Please, do not abuse 'tool_requires'**. Those are intended only for executables like ``cmake`` and ``ninja`` running in the "build"
4545
context, not for libraries or library-like dependencies, that must use ``requires`` or ``test_requires``.
46+
- Positional arguments when invoking Conan should be specified first, before any named argument. For example,
47+
``conan install . -s="os=Windows"`` is correct, but ``conan install -s="os=Windows" .`` is not.
48+
Likewise, it's recommended to use ``=`` instead of spaces between the name and value of named arguments.
49+
This is to avoid some ambiguity scenarios when parsing the command line arguments.
4650

4751
Forbidden practices
4852
-------------------

0 commit comments

Comments
 (0)