Daniel Grunwald
149dea7412
Add TypeGraphNode to NRefactory; and move AbiComparer from NR.CSharp.Analysis to NR.Analysis
12 years ago
Daniel Grunwald
e1f13aaedf
Replace ExpressionOfCompatibleTypeCastIssue with CS0029InvalidConversionIssue.
12 years ago
Daniel Grunwald
1cec2e62f8
Ensure we pass the correct type argument to GatherVisitorBase<>.
12 years ago
Mike Krüger
5dec9ee365
Added DescendantNodes API.
12 years ago
Ciprian Khlud
8666d6ffae
Fix of bug #11855
...
https://bugzilla.xamarin.com/show_bug.cgi?id=11855
This will notify user to use after ifs, whiles and fors not colons, but blocks.
12 years ago
Ciprian Khlud
c43a3ee9c3
Remove duplicate ifs, in if/else chains in case that the expression is duplicated. It can happen in copy/paste cases.
...
Fixes formatting of the previous commit to match K&R style.
12 years ago
Ciprian Khlud
6e4f648b48
Added code issue to address bug #11856
...
https://bugzilla.xamarin.com/show_bug.cgi?id=11856
This works for expressions by doing the following:
- it looks if the expression is the first in a sequence of conditional expressions
- if is first, it extracts all expressions in the chained expressions
- after that it compares all expressions and if two are found as duplicates, the first duplicate is shown
The code fix will remove the duplicate expression.
This bug will also look to bit operations ( & and | ) as they have similar semantics
12 years ago
Ciprian Khlud
3dcad69810
Remove "Remove Field Refactory" as it is dangerous.
12 years ago
Ciprian Khlud
bd486b50b0
Code updates
12 years ago
Ciprian Khlud
ad0c12d1da
Sample implementation for bug #11866
...
https://bugzilla.xamarin.com/show_bug.cgi?id=11866
The test fails because EOLN issues for now, and it works just for methods that return void for now. But it does look for methods inside the classes that have same: arguments, return type and modifiers (so are duplicates)
12 years ago
Ciprian Khlud
0d391896fb
Fixes bug #10731
...
https://bugzilla.xamarin.com/show_bug.cgi?id=10731
It will look as a separate issue checker for basic interfaces and it will give the first implementation that works as base (so it will not give 5 possible conversions, even all are possible). In practice works really well. It is losely based on the ParameterCanbeDemotedIssue so I exposed the code to not duplicate it. Yet the code is much simpler this action.
12 years ago
Ciprian Khlud
dd8caea759
Fixes bug 11709 part of Xamarin's bugzilla: https://bugzilla.xamarin.com/show_bug.cgi?id=11709
...
It makes ConvertToStaticMethod as an issue.
12 years ago
Ciprian Khlud
c965df75ab
Adds a refactor that removes fairly accurate a field in all places (it is based on FindReferences).
12 years ago
Mike Krüger
dd449ac3ec
Fixed project.
12 years ago
ciplogic
d1196a8ffb
Fixes bug #10728 (Auto-Fix regarding control flow: "Convert to correct type")
12 years ago
leoowen19
579d2aca48
[CodeIssue]PublicConstructorInAbstractClass
...
Convert modifiers of constructors in Abstract class from "public" to
"protected".
12 years ago
leoowen19
42921dca18
[CodeIssue] Redundant Constructor issue
...
Do not need an empty constructor
12 years ago
leoowen19
0d99a1c634
Two new code issues
...
1. Static contructor cannot take parameters.
2. Static constructor cannot take access modifier.
12 years ago
ciplogic
e5f2c0bfd6
Add the capability to remove base call if is not needed. It exposes some classes so maybe I'm not using the proper APIs. But it works good for practical the test case I wrote.
12 years ago
ciplogic
ac9732776c
Makes not static methods
...
A better than nothing implementation of Bug #10730 .
https://bugzilla.xamarin.com/show_bug.cgi?id=10730
When multi-file tracking of methods is implemented, the change should change the usages of variables.Call(...) to ClassName.Call(...)
12 years ago
leoowen19
ee3c6e89ed
[CodeIssue] Redundant Null Check
...
No need to check null where is keyword exits.
12 years ago
Daniel Grunwald
28b623840b
Add unit test demonstrating that the DepthFirstVisitor optimization was invalid.
12 years ago
Mike Krüger
8704de6646
Implemented composed type formatting.
12 years ago
Mike Krüger
772b66e109
Added code action from Ciprian Khlud <ciprian.mustiata@yahoo.com>:
...
InvertIfAndSimplify
12 years ago
Mike Krüger
116d6036bf
Added simplify if actions from Ciprian Khlud
...
<ciprian.mustiata@yahoo.com>.
12 years ago
Mike Krüger
79dbb0f9af
Added create changed event action.
12 years ago
Mike Krüger
84e9a33715
Added ABI comparer.
13 years ago
Mike Krüger
ac5cf7888e
Fixed semantic highlighting bug & added highlighting unit tests.
13 years ago
Mike Krüger
40a2b81b43
Implemented issue provider for CS0127: A method with a void return
...
type cannot return a value.
This issue provider got requested - and I need to start somewhere to
implement semantic error issue providers.
13 years ago
Mike Krüger
f480c60aec
Added new code issue to simplify anonymous methods to delegate usages.
13 years ago
Mike Krüger
bce7b74426
Fixed bug in GetCurrentParameterIndex + added unit tests for this
...
function.
13 years ago
Erik Källén
867dc8b407
Improved handling of sizeof(x)
...
Resolving sizeof(x) will now return a specialized ResolveResult that contains information about which type's size is investigated. Also fixed a bug that caused sizeof() to not work when initializing fields. Also made sizeof(SomeEnum) resolve to the size of the underlying type which is illegal according to the spec, but mcs allows it.
13 years ago
Daniel Grunwald
9378cd19f0
Fix bug in ParameterizedType.VisitChildren() when replacing the generic type definition.
...
Fix some typos in XmlDoc.
13 years ago
Mike Krüger
eab84734b2
Fixed bug in create constructor action & implemented create enum value
...
action.
13 years ago
Daniel Grunwald
7eeb0348fb
Attempt that makes all the implicit conversions work
...
However, it introduces a problem with one of the explicit conversion test cases.
13 years ago
Daniel Grunwald
6d0f3fb02e
Add "add using" context action.
...
The unit tests are based on pull request #104 by Adam Connelly
13 years ago
Mike Krüger
92ad81deaa
[CodeCompletion] Completion engine now can generate import completion
...
data.
13 years ago
Mike Krüger
b609c8d6f7
[Formatter] Worked on a indent engine.
13 years ago
Mike Krüger
b35db0cf21
[CodeAction] Improved create event invocator action.
13 years ago
Daniel Grunwald
536b9b0b1c
Add issue provider for missing StringComparison argument to string.StartsWith/EndsWith/IndexOf/LastIndexOf calls.
13 years ago
Mike Krüger
28c635f11d
[CodeIssues] Removed LocalVariableOnlyAssignedIssue - it's redundant
...
and handled by RedundantAssignmentIssue
13 years ago
Lopatkin Ilja
4b3f83be72
Implemented code action to sort usings
13 years ago
Adam Connelly
4f3695ca03
[CodeIssues] Adding an issue that highlights when a base class does not have a parameterless constructor, and the child class does not invoke any of the base class constructors.
13 years ago
Mike Krüger
f43d5df0e2
[CodeIssues] New issue to convert .Where(p).Any() to .Any(p). (from shani)
13 years ago
Simon Lindgren
79b4c25ccc
[CodeIssues] ParameterCanBeDemotedIssue: Add Criterions for suitable indexer members and for array types. Also start resolving the method with the new type to check for errors.
13 years ago
Daniel Grunwald
40bbafda16
Set NET_4_0 preprocessor symbol for mcs.
...
Rename "NET45" to "NET_4_5" to be consistent with mcs and Mono.Cecil.
13 years ago
Mansheng Yang
c63f65a570
[CodeIssue] Added MethodOverloadHidesOptionalParameterIssue
13 years ago
Simon Lindgren
76670db70c
[CodeActions] Add ConvertLambdaToAnonymousDelegateAction.
13 years ago
Simon Lindgren
1797fa2c04
[CodeActions] Add convertAnonymousDelegateToLambdaAction.
13 years ago
Mike Krüger
ddd341b42b
[CodeActions] Fixed bug in create backing store.
13 years ago