diff --git a/.github/workflows/richnav-all.yml b/.github/workflows/richnav-all.yml new file mode 100644 index 0000000..a7bde27 --- /dev/null +++ b/.github/workflows/richnav-all.yml @@ -0,0 +1,65 @@ +### This template is meant to be used by a multi-language repo running RichNav. +### It provides rich navigation for C#, JavaScript, TypeScript, C++, and Java +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository + +name: Rich Code Navigation + +on: + pull_request: + push: + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] + +jobs: + richnav: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + + # **** Please change 'working-directory' to be the location where your .SLN file is located **** # + - name: Install dependencies + run: dotnet restore + working-directory: ./csharp + + # **** Please change the version of Node being used to the one for your project **** # + - name: Use Node.js 12.x + uses: actions/setup-node@v1 + with: + node-version: 12.x + + # **** Please update to point to the location where your node dependencies are installed **** # + - uses: actions/cache@v2 + id: caching-stage + name: Cache dependencies + with: + path: node_modules + key: ${{ runner.os }}-dependencies-${{ hashfiles('typescript/yarn.lock') }} + restore-keys: ${{ runner.os }}-dependencies- + + # **** Please update, at least, the working directory below. You may also want to use npm install instead **** # + - run: yarn + working-directory: typescript + if: steps.caching-stage.outputs.cache-hit != 'true' + + # **** If you use NPM to install packages, please uncomment this task and delete the yarn task **** # + # - name: npm install + # working-directory: typescript + # run: npm install + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + languages: csharp,java,typescript,cpp diff --git a/.github/workflows/richnav-csharp-multiple-sln.yaml b/.github/workflows/richnav-csharp-multiple-sln.yaml new file mode 100644 index 0000000..6bc51a6 --- /dev/null +++ b/.github/workflows/richnav-csharp-multiple-sln.yaml @@ -0,0 +1,37 @@ +### This template is meant to be used by a C# repository with multiple solutions running RichNav +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository +name: Rich Code Navigation (.NET Core - Multiple Solutions) + +on: + pull_request: + push: + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] + +jobs: + build: + + runs-on: windows-latest + strategy: + matrix: + # **** Please change the list to be the folders which contain solutions **** # + slnDirs: [ './csharp', './AnotherSolution' ] + + steps: + + - uses: actions/checkout@v2 + + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + + - name: Install dependencies + run: dotnet restore + working-directory: ${{ matrix.slnDirs }} + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: csharp + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/richnav-csharp.yml b/.github/workflows/richnav-csharp.yml new file mode 100644 index 0000000..c384103 --- /dev/null +++ b/.github/workflows/richnav-csharp.yml @@ -0,0 +1,34 @@ +### This template is meant to be used by a C# repository running RichNav +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository +name: Rich Code Navigation (.NET Core) + +on: + pull_request: + push: + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] + +jobs: + build: + + runs-on: windows-latest + + steps: + + - uses: actions/checkout@v2 + + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + + # **** Please change 'working-directory' to be the location where your .SLN file is located **** # + - name: Install dependencies + run: dotnet restore + working-directory: ./csharp + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: csharp + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/richnav-java.yml b/.github/workflows/richnav-java.yml new file mode 100644 index 0000000..ff2e182 --- /dev/null +++ b/.github/workflows/richnav-java.yml @@ -0,0 +1,28 @@ +### This template is meant to be used by a Java repository running RichNav +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository + +name: Rich Code Navigation (Java with Maven) + +on: + pull_request: + push: + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] + +jobs: + richnav: + + runs-on: windows-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up JDK 1.8 + uses: actions/setup-java@v1 + with: + java-version: 1.8 + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: java + repo-token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/richnav-scheduled.yaml b/.github/workflows/richnav-scheduled.yaml new file mode 100644 index 0000000..f6cc8fe --- /dev/null +++ b/.github/workflows/richnav-scheduled.yaml @@ -0,0 +1,35 @@ +### This template is meant to be used by a C# repository running RichNav on a scheduled cadence. +### This is particularly appropriate for reference repositories that aren't updated monthly. +### Please replace the C# specific steps with steps for your particular language +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository +name: Rich Code Navigation (.NET Core) + +on: + schedule: + # **** This runs the action on the 14th of every month at midnight. Adjust the schedule as appropriate for your needs **** # + - cron: '0 14 * * 1' + +jobs: + build: + + runs-on: windows-latest + + steps: + + - uses: actions/checkout@v2 + + # **** If you've defined a specific dotnet version in global.json, change 'dotnet-version' to the version of the .NET SDK used in your project **** # + - name: Setup .NET Core + uses: actions/setup-dotnet@v1 + with: + dotnet-version: 3.1.101 + + # **** Please change 'working-directory' to be the location where your .SLN file is located **** # + - name: Install dependencies + run: dotnet restore + working-directory: ./csharp + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: csharp + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/richnav-typescript.yml b/.github/workflows/richnav-typescript.yml new file mode 100644 index 0000000..590779c --- /dev/null +++ b/.github/workflows/richnav-typescript.yml @@ -0,0 +1,47 @@ +### This template is meant to be used by a TypeScript or JavaScript repository running RichNav +### Please fill anything marked above with a "# **** #" comment with the value appropriate for your repository + +name: Rich Code Navigation (Node JS) + +on: + pull_request: + push: + # **** Add any the name of your default branch, or any branch you want indexed on every push **** # + branches: [ main ] + +jobs: + richnav: + + runs-on: windows-latest + + # **** If necessary, use the Node version for your repository. Note: must be greater than 10.x **** # + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + + # **** Please update to point to the location where your node dependencies are installed **** # + - uses: actions/cache@v2 + id: caching-stage + name: Cache dependencies + with: + path: node_modules + key: ${{ runner.os }}-dependencies-${{ hashfiles('typescript/yarn.lock') }} + restore-keys: ${{ runner.os }}-dependencies- + + # **** Please update the working-directory to the location where your package.json file resides **** # + - run: yarn + working-directory: typescript + if: steps.caching-stage.outputs.cache-hit != 'true' + + - uses: microsoft/RichCodeNavIndexer@v0.1 + with: + languages: typescript + repo-token: ${{ secrets.GITHUB_TOKEN }} + diff --git a/.gitignore b/.gitignore index bfb15f2..6f20df6 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,9 @@ ## ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore +# TypeScript +typescript/lib +node_modules .vscode/ # User-specific files diff --git a/AnotherSolution/AnotherSolution.sln b/AnotherSolution/AnotherSolution.sln new file mode 100644 index 0000000..411d3f5 --- /dev/null +++ b/AnotherSolution/AnotherSolution.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 16 +VisualStudioVersion = 16.0.30426.262 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AnotherSolution", "AnotherSolution\AnotherSolution.csproj", "{4343B1BF-A100-4951-90AD-42CB919F2895}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4343B1BF-A100-4951-90AD-42CB919F2895}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4343B1BF-A100-4951-90AD-42CB919F2895}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4343B1BF-A100-4951-90AD-42CB919F2895}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4343B1BF-A100-4951-90AD-42CB919F2895}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {CE15F879-CB32-4B6C-89A8-1C23E5920DEF} + EndGlobalSection +EndGlobal diff --git a/AnotherSolution/AnotherSolution/AnotherSolution.csproj b/AnotherSolution/AnotherSolution/AnotherSolution.csproj new file mode 100644 index 0000000..c73e0d1 --- /dev/null +++ b/AnotherSolution/AnotherSolution/AnotherSolution.csproj @@ -0,0 +1,8 @@ + + + + Exe + netcoreapp3.1 + + + diff --git a/AnotherSolution/AnotherSolution/Program.cs b/AnotherSolution/AnotherSolution/Program.cs new file mode 100644 index 0000000..6e4c684 --- /dev/null +++ b/AnotherSolution/AnotherSolution/Program.cs @@ -0,0 +1,12 @@ +using System; + +namespace AnotherSolution +{ + class Program + { + static void Main(string[] args) + { + Console.WriteLine("Another testing solution!"); + } + } +} diff --git a/csharp/src/GameObject.cs b/csharp/src/GameObject.cs index 9a2a382..e0916d2 100644 --- a/csharp/src/GameObject.cs +++ b/csharp/src/GameObject.cs @@ -15,6 +15,7 @@ public GameObject(int x, int y) public void interact() { Console.WriteLine("Interacting with GameObject"); + Console.WriteLine("Nice work! You rock!"); } public void draw() @@ -22,4 +23,4 @@ public void draw() Console.WriteLine($"Drawing GameObject at position: {this.posX} {this.posY}"); } } -} \ No newline at end of file +} diff --git a/csharp/src/Program.cs b/csharp/src/Program.cs index 0613f9c..4450b73 100644 --- a/csharp/src/Program.cs +++ b/csharp/src/Program.cs @@ -6,6 +6,7 @@ class Program { static void Main(string[] args) { + Console.WriteLine("hello!"); Interactive block = new GameObject(10, 10); block.interact(); } diff --git a/java/src/main/java/com/test/sort/App.java b/java/src/main/java/com/test/sort/App.java index f72a225..94c6bde 100644 --- a/java/src/main/java/com/test/sort/App.java +++ b/java/src/main/java/com/test/sort/App.java @@ -9,6 +9,7 @@ public class App public static void main( String[] args ) { System.out.println( "Hello World!" ); + System.out.println("Hiya!"); } } diff --git a/typescript/package.json b/typescript/package.json new file mode 100644 index 0000000..7b5361b --- /dev/null +++ b/typescript/package.json @@ -0,0 +1,14 @@ +{ + "name": "tester-game", + "version": "0.0.1", + "description": "A simple Typescript game to test things", + "main": "App.js", + "license": "MIT", + "scripts": { + "build": "tsc -p ./" + }, + "dependencies": { + "@types/node": "^14.11.3", + "add-two-number": "^0.2.0" + } +} diff --git a/typescript/src/Block.ts b/typescript/src/Block.ts index e4aa2e1..126444b 100644 --- a/typescript/src/Block.ts +++ b/typescript/src/Block.ts @@ -6,6 +6,6 @@ export default class Block extends GameObject { } interact(): void { - console.log('You get a coin!'); + console.log('You get a coin, you rock star!'); } -} \ No newline at end of file +} diff --git a/typescript/src/GameObject.ts b/typescript/src/GameObject.ts index d529293..f76e0f9 100644 --- a/typescript/src/GameObject.ts +++ b/typescript/src/GameObject.ts @@ -1,5 +1,6 @@ import Drawable from './Drawable' import Interactive from './Interactive' +const add: any = require('add-two-number'); export default class GameObject implements Drawable, Interactive { posX: number; @@ -12,9 +13,11 @@ export default class GameObject implements Drawable, Interactive { interact(): void { console.log("Interacting with GameObject"); + console.log(`Adding two numbers: ${add(this.posX, this.posY)}`); } draw(): void { console.log(`Drawing GameObject at position: ${this.posX} ${this.posY}`); + console.log('hi, mom!!'); } -} \ No newline at end of file +} diff --git a/typescript/src/Interactive.ts b/typescript/src/Interactive.ts index b142567..1e6083f 100644 --- a/typescript/src/Interactive.ts +++ b/typescript/src/Interactive.ts @@ -1,3 +1,4 @@ export default interface Interactive { + // interacts interact: () => void; -} \ No newline at end of file +} diff --git a/typescript/yarn.lock b/typescript/yarn.lock new file mode 100644 index 0000000..77e9bd2 --- /dev/null +++ b/typescript/yarn.lock @@ -0,0 +1,8 @@ +# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. +# yarn lockfile v1 + + +add-two-number@^0.2.0: + version "0.2.0" + resolved "https://registry.yarnpkg.com/add-two-number/-/add-two-number-0.2.0.tgz#f21e52b3a328f3551b247489b4b0351465ef363e" + integrity sha512-zB+QIdul0cHNXAj1xVAhzhk8WQ8JvLYlp1L3kwZr3zIIgdV+U1kp4DkRJRqutvPgDl1jBG9TcbMU3cWgeY9d7w==