Add NoAsyncRunSynchronouslyInLibrary rule
Added new NoAsyncRunSynchronouslyInLibrary rule and tests for it.
Make rule pass new tests by checking all nodes in the file for test attributes
But we don't want the check to be just about the file but about the whole assembly.
Make rule pass new tests by checking all nodes in the file for test attributes
But we don't want the check to be just about the file but about the whole assembly.
The whole assembly check will only work when linting project or solution.
The whole assembly check will only work when linting project or solution.
I know. That's why we don't recommend (show a warning) when only linting files.
BTW, in my comment (https://github.com/fsprojects/FSharpLint/pull/785#issuecomment-3547185545) I'm quoting some text from a commit msg, that either should be fixed (changed the wording), or implemented properly.
BTW, in my comment (https://github.com/fsprojects/FSharpLint/pull/785#issuecomment-3547185545) I'm quoting some text from a commit msg, that either should be fixed (changed the wording), or implemented properly.
After you have fixed the above, let's add 2 more commits:
- 1st will be, in all cases where you have changed the API of FSharpLint.Core in this PR (for example to change
Foo(): BartoAsyncFoo(): Async<Bar>), reintroduce the old method/function: Foo() that will simply call Async.RunSyncronously AsyncFoo(). CI of this commit will obviously fail on SelfCheck. - 2nd commit will decorate all these methods with an
Obsoleteattrib, will also change the rule to ignore methods/functions with this attrib, add 2 more tests, and its CI should be green.
Rebased.
And let's rebase this again
And let's rebase this again
Rebased
let's squash commit Revert "Benchmarks: suppress rule" because:
- its commit msg got obsolete, after the rebases
- there shouldn't be reverts of commits that live in the same PR