-
Notifications
You must be signed in to change notification settings - Fork 102
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
Support for C# static analysis #584
Open
intjftw
wants to merge
62
commits into
Ericsson:master
Choose a base branch
from
intjftw:csharp_plugin
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
62 commits
Select commit
Hold shift + click to select a range
eb2a364
csharp plugin added
Borisz42 48d98ee
gitignore update
Borisz42 8127a2c
gitignore update2
Borisz42 c831e8f
csharp parse from cmd path param
Borisz42 e0e9c0d
testing boost
Borisz42 de199d2
cmake buildable
Borisz42 67f89af
return added at parseCompileCommands_dir
Borisz42 a347422
proper build and run from install directory
Borisz42 b8ff653
Parametric connection-string
Borisz42 77bc130
commandline arguments fix
Borisz42 74ff887
assemblies added in csharp
Borisz42 5a2ad78
linq variable detection
Borisz42 be518ed
database create bug solved
Borisz42 4d7d85e
js files
Borisz42 86db562
Merge branch 'master' into csharp_plugin
Borisz42 3e858dc
Thrift csharp lib added, csharp service init
Borisz42 9bc4a03
csharpMenu gtag update
Borisz42 addff01
Unimplemented methods added to csharp service
Borisz42 c1e078c
Csharp service updates to run a succesfull build
Borisz42 caf19bb
parser addSource problem
Borisz42 1c9f41e
parser linking problem solved
Borisz42 6171a93
csharp astnode-id generator
Borisz42 33720f9
Added base of the service with some fixes in the parser.
intjftw a906af0
csharpservice boost start
Borisz42 9ebdb06
bulid and json parse error fix
Borisz42 018f49c
service debug
Borisz42 d80b6b2
file type property set
Borisz42 63f274a
Info Tree basics working
Borisz42 d600a48
refactor and getPropertiesAsync
Borisz42 833d8a1
position bug solved
Borisz42 c4c6d0d
parallel parsing
Borisz42 1b853e0
testing and minor fixes
Borisz42 218725f
show variable usage and declaration
Borisz42 b7f5068
usage fix
Borisz42 6cf6325
Display linq evaluation
Borisz42 99d6fe6
LINQ foreach added
Borisz42 5c206c7
IdentifierName visitor added
Borisz42 4463b32
missing try catch added
Borisz42 57b674c
references fileId instead of path in AstnodeInfos
Borisz42 c84a770
usage fix
Borisz42 55c8c43
reference queries
Borisz42 fb9cea0
visibility added
Borisz42 d3fcba5
speed up by less backgroundlogging
Borisz42 807b806
Minor fixes
Borisz42 1fecdf0
"Jump to definition" is working in the inner menu. Added ReferenceTyp…
intjftw b28a733
Refactored database initialization to use context options and migrati…
intjftw fc12e6a
Updated the GitHub Actions CI file.
intjftw 5cdb276
Merge branch 'csharp_plugin' of github.com:intjftw/CodeCompass into c…
Borisz42 268dbab
Adding migrations.
intjftw 73f6b38
Merge branch 'csharp_plugin' of github.com:intjftw/CodeCompass into c…
intjftw 60dc5d1
Updating project versions to .NET, updating all nuget packages and re…
intjftw 22894c9
Updating Dockerfiles to include .NET 6.
intjftw 77e28b3
Merge branch 'master' into csharp_plugin
intjftw d15bcbf
Making C# web service able to serve more than one project in a worksp…
intjftw f870f43
Modified C# parser to be able to work together with C++ parser.
intjftw f5f1877
Modified build system to build files in the build directory.
intjftw 189025e
Separated several commands into different targets in build system.
intjftw 64b4606
Updated .gitignore to exclude potential bin and obj folders within th…
intjftw ee9ab0d
Small fixes.
intjftw 6e30294
Merge branch 'Ericsson:master' into csharp_plugin
intjftw 12ac2a1
Small refactorings.
intjftw 48f9983
Refactored the parsing command to include any number of source file d…
intjftw File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,3 +6,9 @@ nbproject/ | |
*.swp | ||
build/ | ||
build_*/ | ||
|
||
# C# | ||
plugins/**/bin | ||
plugins/**/obj | ||
*.out | ||
*.bak |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 79 additions & 0 deletions
79
lib/csharp/thrift_netstd/Benchmarks/Thrift.Benchmarks/CompactProtocolBenchmarks.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// Licensed to the Apache Software Foundation(ASF) under one | ||
// or more contributor license agreements.See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership.The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
using System.IO; | ||
using System.Threading.Tasks; | ||
|
||
using BenchmarkDotNet.Attributes; | ||
|
||
using Thrift.Protocol; | ||
using Thrift.Transport.Client; | ||
|
||
namespace Thrift.Benchmarks | ||
{ | ||
[MemoryDiagnoser] | ||
public class CompactProtocolBenchmarks | ||
{ | ||
private MemoryStream? _Stream; | ||
private TProtocol? _Protocol; | ||
|
||
[Params(10000)] | ||
public int NumberOfOperationsPerIteration { get; set; } | ||
|
||
[GlobalSetup] | ||
public void GlobalSetup() | ||
{ | ||
_Stream = new MemoryStream(); | ||
var transport = new TStreamTransport(_Stream, _Stream, null); | ||
_Protocol = new TCompactProtocol(transport); | ||
} | ||
|
||
[GlobalCleanup] | ||
public void GlobalCleanup() | ||
{ | ||
_Protocol?.Dispose(); | ||
} | ||
|
||
[Benchmark] | ||
public async Task WriteString() | ||
{ | ||
if ((_Protocol is null) || (_Stream is null)) | ||
throw new System.Exception("unexpected internal state"); | ||
|
||
for (int i = 0; i < NumberOfOperationsPerIteration; i++) | ||
{ | ||
await _Protocol.WriteStringAsync("Thrift String Benchmark"); | ||
_Stream.Seek(0, SeekOrigin.Begin); | ||
} | ||
} | ||
|
||
[Benchmark] | ||
public async Task ReadString() | ||
{ | ||
if ((_Protocol is null) || (_Stream is null)) | ||
throw new System.Exception("unexpected internal state"); | ||
|
||
await _Protocol.WriteStringAsync("Thrift String Benchmark"); | ||
|
||
for (int i = 0; i < NumberOfOperationsPerIteration; i++) | ||
{ | ||
_Stream.Seek(0, SeekOrigin.Begin); | ||
await _Protocol.ReadStringAsync(); | ||
} | ||
} | ||
} | ||
} |
29 changes: 29 additions & 0 deletions
29
lib/csharp/thrift_netstd/Benchmarks/Thrift.Benchmarks/Program.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
// Licensed to the Apache Software Foundation(ASF) under one | ||
// or more contributor license agreements.See the NOTICE file | ||
// distributed with this work for additional information | ||
// regarding copyright ownership.The ASF licenses this file | ||
// to you under the Apache License, Version 2.0 (the | ||
// "License"); you may not use this file except in compliance | ||
// with the License. You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, | ||
// software distributed under the License is distributed on an | ||
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
// KIND, either express or implied. See the License for the | ||
// specific language governing permissions and limitations | ||
// under the License. | ||
|
||
using BenchmarkDotNet.Running; | ||
|
||
namespace Thrift.Benchmarks | ||
{ | ||
internal static class Program | ||
{ | ||
public static void Main(string[] args) | ||
{ | ||
BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args); | ||
} | ||
} | ||
} |
41 changes: 41 additions & 0 deletions
41
lib/csharp/thrift_netstd/Benchmarks/Thrift.Benchmarks/Thrift.Benchmarks.csproj
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<Project Sdk="Microsoft.NET.Sdk"> | ||
<!-- | ||
Licensed to the Apache Software Foundation(ASF) under one | ||
or more contributor license agreements.See the NOTICE file | ||
distributed with this work for additional information | ||
regarding copyright ownership.The ASF licenses this file | ||
to you under the Apache License, Version 2.0 (the | ||
"License"); you may not use this file except in compliance | ||
with the License. You may obtain a copy of the License at | ||
|
||
http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
Unless required by applicable law or agreed to in writing, | ||
software distributed under the License is distributed on an | ||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, either express or implied. See the License for the | ||
specific language governing permissions and limitations | ||
under the License. | ||
--> | ||
|
||
<PropertyGroup> | ||
<OutputType>Exe</OutputType> | ||
<TargetFramework>net6.0</TargetFramework> | ||
<TieredCompilation>false</TieredCompilation> | ||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> | ||
<Nullable>enable</Nullable> | ||
</PropertyGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="BenchmarkDotNet" Version="0.13.1" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<ProjectReference Include="..\..\Thrift\Thrift.csproj" /> | ||
</ItemGroup> | ||
|
||
<ItemGroup> | ||
<PackageReference Update="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.2" /> | ||
</ItemGroup> | ||
|
||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<Project> | ||
|
||
<ItemGroup> | ||
<PackageReference Include="Microsoft.NETFramework.ReferenceAssemblies" Version="1.0.0" PrivateAssets="All" /> | ||
</ItemGroup> | ||
|
||
</Project> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should investigate whether this large pack of Thrift files is really needed as source in the plugin. It seems unncessary.