Skip to content
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

Test merge dev into temp master branch using rebase #8

Merged
merged 109 commits into from
Mar 22, 2019

Conversation

bergmeister
Copy link
Owner

PR Summary

PR Checklist

bergmeister and others added 30 commits June 2, 2018 22:25
…inText and PSAvoidUsingUserNameAndPasswordParams rules (PowerShell#1037)
Allow paths to be pipelined to Invoke-ScriptAnalyzer
Upload only out folder as artifact, which is the actual PSSA artifact
JamesWTruher and others added 29 commits February 7, 2019 12:18
Update documentation to include new behavior for ParseErrors and fix up logic to be a bit cleaner when emiting ParseErrors
…stic

Emit parsing errors as diagnostic records
* Add bootstrapping code to install dotnet

* fix logic for downloading proper dotnet installer.

* add a version checker for installed dotnet

Also harden logic for running the installation script

* Add bootstrapping code to install dotnet

* Handle missing dotnet, and install it.

* Add logic for checking the appropriate version of the Cli tools before starting to build

* Update appveyor.psm1 to use build script bootstrapping for installing dotnet CLI

update build script to handle WMF4 better (theoretically)

* make the hunt for the dotnet executable more generic and try harder to find the exe

* Fix typo when checking for usable versions of dotnet

* use -version rather than ambiguous -v when installing dotnet

* Improve error message when hunting for cli version

Use output of dotnet --version if there are problems with --list-sdks

* ignore errors when first attempting to find dotnet executable

set failure of finding dotnet as a warning, we will attempt to install it during bootstrap
this handles the case of a blank slate where dotnet has never been installed

* Improve logic for handling a system where dotnet has never been installed

* fine tune messages emitted during the hunt for dotnet

* additional logic for finding dotnet executable

* harden search for dotnet

Sometimes you can't even invoke dotnet if the version is too low

* Attempt to quieten build output.

Throw away stderr of dotnet execution under some case and emit it in others.
Change ToString of PortableVersion to enable better sorts

* Fix tostring method for portable version

* add -Raw flag to Get-GlobalJsonSdkVersion

Sometimes we need the raw version so the installation script works, but sometimes we need to be able to compare it with other versions.

* Attempt to harden the upload code

Also add additional verbose output to improve debuggability
print response from upload

* upgrade pester version to 4.4.4

* Force the testsuite TestFixture to be named 'Pester' to get through appveyors test result recognition

* Emit env:LANG to output before executing tests

We've had trouble with LANG being set to something that causes problems, so make sure we report what it is.
Removed a bit of the verbosity which was added for debugging

* Create tests for build module

Fix some errors in the module discovered by the tests

* Add additional tests

Change logic when downloading the dotnet install script
Also enforce en_US.UTF-8 language to ensure that appveyor can see our test results
* Add compatibilty rule serialization types

* Move compatibility checking code into submodule

* Create module manifest, change module base dir name

* Move module to new file, change namespaces

* Add submodule binplace dir to .gitignore

* Delete binary files

* Fix up lsb info function

* Fixup module, correct names and namespaces

* Remove debugger wait

* Improve architecture handling

* Clean up serialization API

* Improve module filtering

* Partial work on query API

* Add more query types

* Update query API, move enums to common

* Add assembly name to type accelerator dictionary

* Add reference to compatibility project in pssa

* Add new command compatibility rule

* Add deep clone, basic rule implementation

* Make profiles multi-platform

* Fix Platform type name usage

* Add intersection logic

* Change to ICloneable, add some union functionality

* More union implementation

* Finish union logic

* Add combinator methods

* Fix profile creation, add combinator cmdlet

* Fix intersection logic, module versioning

* Fix various NREs, try to improve profile combination

* Replace IDictionary with JsonDictionary

* Change build target properly

* Fix broken namespace and build version

* Get output from intersection command

* TODO about intersection

* Fix version intersections

* Add profiles to the committed assets

* Add function to generate any_profile config

* Revert net452 change in order to build

* Make profiles single-platform, enable multiple targets

* Hook rule into testing

* Fix string resources

* Hook cross compat up to first test

* Add custom diagnostic type for compatibility checking

* Begin fixing case sensitivity

* Fix case sensitivity in profile union

* Fix platform property, make test pass

* Add singleton for performance, change tests to test cases

* Add cache clear method for profile loader

* enable building on non-Windows to not target .Net Framework by default (#1)

* Make PSScriptAnalyzer build independent of CrossCompatibility build

* Fix dll path issue in psm1

* Add ubuntu 18.04 profiles

* Fix root module, fix type names, powershell version may be string

* Make script compatible with PSv3

* Fix v3 compat, add union profile name, begin version work

* Add PowerShellVersion class

* Change PowerShell json to new version type, add test build

* Add documentation for UseCompatibleCmdlets2

* Remove PS from configuration example

* Fix versions + build merge problem, start typename fix

* Serialize type names correctly

* Make function exports explicit

* Fix psd1, add type name normalization functions

* Fix name normalization, add type query logic, genericize compatibility rules, add skeleton for type compatibility rule

* Fix type query building bug, rename command compat rule, begin type compat rule

* Build out type compatibility check rule

* Use simple typename expansion

* Remove unused test assets, add scaffold for type tests, change platform naming to include dotnet details

* Fix alias glitch, add native commands, move type conversion api

* Add better profiles, add native command tracking, fix union and build

* Add union profile, move AzF profile out of folder

* Move analysis exception to new file/namespace

* Add -Clean to build script

* Use new ending for profile extension

* Use new structure for native commands

* Add more command tests, fix GAC ignorance in profiler module

* Fix bugs in profile script, add validation function

* Fix profiler bugs, remove old profiles

* Ignore lack of profile dir

* Omit edition on lower PS versions

* Add new profiles, remove intersection logic, fix unions

* Add IDs to profiles for later union autogeneration

* Make profile loader more threadsafe

* Use net452-compatible hashset logic

* Fudge over type compilation bug

* Add types tests, fix command param parsing, fix attribute parsing

* Update documentation, add types test

* Add copyright headers

* Add some doc comments - more to come

* Add simple syntax compatibility rule

* Add workflow checking

* Remove parallel and sequence linting

* update .net core version in README.md to match global.json

* The engine project does not need a reference to the crosscompat project since the Rules project has this already

* Remove example file

* Fix safe expression evaluation in settings parser

* Remove bad debug code

* Update language in gitignore

* Add proper resource strings

* Make tests pass

* Remove unneeded bits

* Add MEF attributes

* Fix executable name problem

* Use correct report summary switch

* Fix test bugs

* Tweaks to failing tests

* Add documentation comments to C#

* Remove violations error write in test

* Add debug to csproj const properties

* Simplify build macros in the hope that they work now

* Make profile cache case insensitive

* Add PSV3/4 flags to debug configurations

* Improve new-object correction syntax

* Add tests for and fix up GetSafeValue implementation

* Move to autogenerated union files

* Quote paths for testing, add exception to alias tests, remove unused regex

* Add command parameter and static type member checking

* Enforce readonly nature of platform object

* Fix bugs in code and test

* Write union profile out on creation

* Add ignore settings for command and type compatibility rules

* Add more testing, fix bugs, renew profiles

* Detect dynamic method invocation for ps3 compatibility

* Move from PLINQ to tasks

* Take out nonfix in command rule, fix build script syntax problem

* Fix profile union, type compat bugs, add type compat tests

* Add script test for compatible commands

* Add tests for compatible syntax rule

* Add repo-facing tests for UseCompatibleSyntax

* Temp test to see ubuntu problem

* Fix ubuntu date alias test

* Fix test failure in PSv3/4

* Make new error messages into resource strings

* Add newtonsoft.json manually in old old powershell versions

* Filter diagnostics to omit parse errors

* Fix last PSv3/4 specific test

* Use better compile-time macro

* Get rid of verbose logging of activator instantiation

* Turn LINQ into lazy static methods

* Fix NRE in types, move command query tables to lazy methods

* Add CrossCompatibility to AppVeyor build and test

* Prevent trying to reload CrossCompatibility.dll

* Add Windows SKU enum to platform query object

* Fix problems with CC module in AppVeyor path

* More probing

* Fix CC build condition

* Add FX to build script params

* Attempt to fix Dll binplace issue

* Fix typename logic

* Fix EOL in files

* Remove unused LINQ calls

* Address some of @JamesWTruher's feedback

* Better way to get common parameters

* Address more of @JamesWTruher's feedback

* Address @bergmeister's add-type feedback

* Address pipe usage, nasty foreach

* Profiles bundled as a ZIP file

* Ignore zip type in build file

* Ensure zip functions are present

* Change name of cross compat assembly

* Add cross compat asm to signing

* Address more of @JamesWTruher's feedback

* Fix build path bug

* Make some profiles optional, improve compat rule docs

* Add documentation

* Remove defunct anyplatform name

* Add exclusion parameters to cc module

* Add parameter documentation

* Fix automatic variable detection

* Add explicit default case

* Fix tests for fewer rules

* Fix type compat test profile bugs

* Fix compatibility module bug

* Add path exclusions to module

* Fix linux pscustomobject problem

* Fix profile module bugs, update profiles

* Update documentation for profile names

* Rename module and sign

* Fix build name bug

* Upgrade docket .NET version

* Ignore clean error

* Add verbose message to release script

* Verbose hack

* Remove verbose

* Tweak out copy

* Fix signing xml

* Fix signing XML

* Correct framework signing to net452

* Remove AuthenticodeDual

* Update signing for PSCompatibilityAnalyzer

* Update VSCode search exclusion for profiles

* Fix loading problem in PowerShell 5

* Fix Add-Type Newtonsoft in PS 5

* Add missing copyright headers

* Add other copyright headers
* add command data file for pwsh 6.1.0 on windows 10 1803. Also make it the default reference

* add command date file using Ubuntu 18.04

* update documentation

* add os details about command data files

* Add macOS file from SteveL-MSFT and add to documentation

* Add command data file for raspbian and add to docs. Thanks @tylerl0706

* Remove 6.0.2 files since we have 6.1 files and 6.0 is out of support already

* fix failing test by adapting settings file and add more info to documentation
… out of support now and update Newtonsoft.Json to 11.0.2 (PowerShell#1165)

* Raise minimum required PS version of PS 6 to 6.1.0 due to 6.0 running out of support now

* Update version of Newtonsoft.Json to 11.0.2
* Fix rule name lookup mismatch for custom rules to allow for suppresion and unify code

* Remove note that custom rules suppression are not supported

* fix CustomizedRule.tests.ps1

* do not change GetName method and add GetFullName method instead to avoid breaking existing functionality, therefore also revert the last change in test file

* Add test and fix dummy test rule to return script extent. TODO: Fix suppressing custom rules when there is no Extent supplied

* Make test custom rule return null extent again by fixing the Engine to be able to cope with it
PowerShell#1092)

* Check for 1 whitespace AFTER curly brace in new InnerCurly option

* check for one space in closing of inner brace

* add check for pipes. TODO: messages

* update settings files and add first set of tests for curly braces. TODO: cater for newlines

* fix new line handling for innerbrace

* fix suggested corrections and add another test case for inner brace

* order settings alphabetically and add tests for checkpipe

* fix test that returned 2 warnings now due to checkinnerbrace

* fix innerPipe and write documentation

* tweak backtick scenarios

* fix 1 failing test

* customise warning messages

* swap messages to be correct

* add more test cases and fix small bug whereby the missing space before the closing brace would not be correctly replaced

* enforce whitespace also if there is more than 1 curly brace. TODO: add test case for that

* add test cases for nested parenthesis and add validation to test helper method to inform about limited functionality

* add test case for more than 1 space inside curly braces and tidy up tests
…erShell#1091)

* add command data file for v2 (needed to adapt script)

* trigger ci
…re is a multi-line statement after a pipe and add PipelineIndentation customisation option for it (PowerShell#1102)

* Fix PSUseConsistentIndentationRule to handle pipes correctly when there is a multi-line statement after it: Do not just add temporary indentation for the next line but keep the indentation level

* correctly decrement indentation count for multiple pipes

* add customisation

* take pipeline into account and add docs. TODO: Change shipped setting files

* update formatting setting files

* add tests and refactor/improve test suite

* Apply suggestions from code review

Co-Authored-By: bergmeister <c.bergmeister@gmail.com>

* Remove else block by using break
…l#1161)

* Fix settings file array parsing when no commas are present

* Add extra test

* Improve comment

* Add test file

* Change test to accept null

* Fix new-item call in PS 4
…tem.Reflection.TypeExtensions package (PowerShell#1105)

* Unify reference to Microsoft.Management.Infrastructure and update System.Reflection.TypeExtensions package

* trigger ci
…rShell#1117)

* first working prototype: Invoke-Formatter get-childitem

* tweak for fully qualified cmdlets and add tests

* add rule documentation and fix 3 tests as part of that

* add resource strings

* fix 1 test (severity) and docs test due to rule name

* fix failing test using a workaround

* fix tests

* remove workaround in test that has been fixed upstream

* cleanup and use helper method for getting cached cmdlet data
* Populate RuleSuppressionID as well when translating DiagnosticRecord in custom rules

* fix NullReferenceException
…erShell#1099)

* Fix Parsing of settings that occurs when using turkish culture

* use german culture before running tests to exhibit failures

* set ui culture as well

* fix communityanalyzer for turkish culture

* fix ProvideCommentHelp for turkish culture (i problem again)

* update comments

* fix for import-localizedDatabug in pscore (opened issue 8219 in ps core repo)

* change to UI culture

* use invariant culture comparison instead of tolowerinvariant and revert change where it is not needed

* finish with comments

* Use OrdinalIgnoreCase

* revert accidental change from 2 commits before

* trigger ci

* Apply suggestions from code review

Co-Authored-By: bergmeister <c.bergmeister@gmail.com>

* Use else-less approach to address PR comment
* Redo command info cache changes

* Fix comment typo

Co-Authored-By: rjmholt <rjmholt@gmail.com>

* Trigger CI
* Drop back to 2.1.4 for sdk in container

* Don't take input for building, the release tag is never used

* Push version to 1.18.0

* add param statement in vstsbuild script

* add dummy ReleaseTag

* Move up to sdk 2.1.9

* Revert "Move up to sdk 2.1.9"

This reverts commit dd353a0.
… file (PowerShell#1176)

This is because we might be installed in a versioned directory, rather than
the a directory name PSScriptAnalyzer, we'll be in PSScriptAnalyzer/1.18.0
… 1.18.0 whereby PSAvoidUsingPositionalParameters was not taking aliases into account any more (PowerShell#1175)

* Allow aliases or external script definitions as well so that positionalparameters triggers on them as well

* add test
* Update README.md

* Update appveyor.psm1
* Fix obvious cut/paste error for the topic title

Add another example using a settings object
* Changelog for 1.18.0

* Apply suggestions from code review

Co-Authored-By: bergmeister <c.bergmeister@gmail.com>

* Update CHANGELOG.MD

Co-Authored-By: bergmeister <c.bergmeister@gmail.com>

* Uodate PR description of bug with Invoke-Formatter to address PR feedback

* address pr comment about breaking change

* Apply suggestions from code review

* Update with recently merged PRs
* Changing back to non-zipped compatibility profiles

The size savings aren't there, as the gallery stores modules
as nuget files. Also, there was an issue that if you installed into the public location as administrator and then ran as a regular user, a catastrophic failure in analyzer occurred.

* Update build script to copy profiles into place

* Fix build by correcting typo in compatibility_profiles directory
@bergmeister bergmeister merged commit 18426fe into master_test Mar 22, 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