Skip to content

Lint activate.ps1 #1373

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 23, 2019
Merged

Lint activate.ps1 #1373

merged 1 commit into from
Jul 23, 2019

Conversation

jayvdb
Copy link

@jayvdb jayvdb commented Jun 25, 2019

Fix PSScriptAnalyzer warnings, and follow style from
-Setting CodeFormattingOTBS

Closes #1371

@jayvdb
Copy link
Author

jayvdb commented Jun 25, 2019

Now passes the following two commands

Invoke-ScriptAnalyzer activate.ps1
Invoke-ScriptAnalyzer -Setting CodeFormattingOTBS activate.ps1

@jayvdb
Copy link
Author

jayvdb commented Jun 26, 2019

Note that while the tests pass, I dont have Windows so I havent played with this. I do have pwsh for Linux, and I could test with that if it is known to work (and add tests for that?)

It should be reviewed by someone who can verify that it works correctly, or identify extra tests that need to be written to verify it is working correctly.

@jayvdb jayvdb closed this Jun 26, 2019
@jayvdb jayvdb reopened this Jun 26, 2019
@gaborbernat
Copy link
Contributor

please run tox -e embed and commit the generated change

@jayvdb
Copy link
Author

jayvdb commented Jun 27, 2019

I got a non-zero exit code, but I guess that is OK.

> python3 -m tox -e embed
embed create: /home/jayvdb/projects/python/virtualenv/.tox/embed
embed installdeps: pip >= 19.1.1
embed run-test-pre: PYTHONHASHSEED='4009722547'
embed run-test: commands[0] | python update_embedded.py
Found file site.py
  File up to date (crc: 458366c2)
Found file activate.sh
  File up to date (crc: 0d63b5ff)
Found file activate.fish
  File up to date (crc: e5f7c440)
Found file activate.csh
  File up to date (crc: ff2bf2f5)
Found file activate.xsh
  File up to date (crc: fec22784)
Found file activate.bat
  File up to date (crc: 0f734cb0)
Found file deactivate.bat
  File up to date (crc: 9ddc164f)
Found file activate.ps1
  Content changed (crc: d8005bb6 -> c7bc785c)
Found file distutils-init.py
  File up to date (crc: affaad52)
Found file distutils.cfg
  File up to date (crc: cd607b02)
Found file activate_this.py
  File up to date (crc: 544ed6ab)
Found file python-config
  File up to date (crc: 9a7177a5)
Content updated; overwriting... done.
ERROR: InvocationError for command /home/jayvdb/projects/python/virtualenv/.tox/embed/bin/python update_embedded.py (exited with code 1)
________________________________________________________________________________ summary _________________________________________________________________________________
ERROR:   embed: commands failed

@jayvdb
Copy link
Author

jayvdb commented Jul 21, 2019

Updated to use the default style, called CodeFormatting, not OTBS per #1371 (comment)

Fix PSScriptAnalyzer warnings, and follow style from
-Setting CodeFormatting

Closes pypa#1371
@jayvdb
Copy link
Author

jayvdb commented Jul 21, 2019

It looks like the CI error isnt related to my changes. Please correct me if I am wrong about that.

@gaborbernat gaborbernat merged commit a3258e2 into pypa:master Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix lint in activate.ps1
2 participants