Coder Social home page Coder Social logo

code-searcher's Introduction

koepalex GitHub stats

Hi fellow Devs ๐Ÿ‘‹

  • ๐Ÿ”ญ Iโ€™m currently working on something with kubernetes
  • ๐ŸŒฑ Iโ€™m currently learning rust
  • ๐Ÿ‘ฏ Iโ€™m looking to collaborate on code-searcher
  • ๐Ÿ’ฌ Ask me about software architecture or Industrial IoT or Manufacturing ๐Ÿฑโ€๐Ÿ’ป
  • ๐Ÿ“ซ How to reach me: twitter.com/koepalex
  • ๐Ÿ˜„ Pronouns: he/him/his

code-searcher's People

Contributors

koepalex avatar lutzboeckelmann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

jwupf nasa03

code-searcher's Issues

Search code using wildcard

User Story

As a User
I want to search using wildcards (? and *)
so that I have mor flexibility while searching.

Acceptance Criteria

  • search with ? replaces one random character
    • e.g. net????app matches with netcoreapp
  • search with * replaces multiple random chracter
    • e.g. ne*pp matches with netcoreapp
  • search with wildcard, can be caused by additional parameter (--wc)

Definition of Done

  • Command line Argument is documented
  • New tests for wildcard search are added
  • all existing tests run successfully
  • no additional compile warnings

[Feature] WPF App - Show Path Information

User Story

As a user
I want to see the path Information of files with findings
so that I can distinguish files with same Name in different folder

Acceptance Criteria

  • path information are shown in brackets behind filename in list of findings

Definition of Done

  • All existing tests run successfully
  • No additional compile warnings introduced

Dynamic Configuration of Port used by CodeSearcher.WebAPI

Currently CodeSearcher.WebAPI uses fix port 5000, when an instance of the web api is already running or another process uses this port the WPF App is failing.

  • WebAPI should be configurable e.g. via command line parameter to define the port to be used
  • WPF app should detect free port and configure WebAPI to use this port

Build IndexManager

To simplify the useage, the code-search should have an manager that handles all kind of indexes.
The required features are:

  • List all existing Indexes
    • retuns empty enumeration if no exist
  • Get Index by id
    • throws exception if id is unkown
  • Create new Index
  • Delete existing Index by id

[Bug] CodeSearcher CLI crashes not gracefully if SourcePath point to a file

To check if the commandline works correctly I have accidentally used a file path instead of a
directory which leads to a crash.

Options:

  1. Index the file
  2. Exit gracefully with a correct message

Crash output:
โ€‹D:\git\code-searcher\CodeSearcher\bin\Debug\net5.0 [NewInternalCmdLineHandleInterface +0 ~5 -0 !]
ฮป .\CodeSearcher.exe --mode index --indexPath "D:\git\code-searcher\CodeSearcherTests\SystemTests\DownloadedTestData" --sourcePath "D:\git\code-searcher\CodeSearcherTests\SystemTests\DownloadedTestData\Fifteen Thousand Useful Phrases\Fifteen Thousand Useful Phrases.txt"
Welcome to CodeSearcher
16:57:56 CodeSearcher Reading Index Overview from C:\Users\lutzb\AppData\Local\code-searcher\IndexOverview.json
16:57:56 CodeSearcher Reading Index Overview from C:\Users\lutzb\AppData\Local\code-searcher\IndexOverview.json


Index of new Source Directory


One or more errors occurred. (One or more errors occurred. (Source Folder dosn't exist!))
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at CodeSearcher.BusinessLogic.CodeSearcherLogic.<>c__DisplayClass6_0.b__1() in D:\git\code-searcher\CodeSearcher.Index\CodeSearcherLogic.cs:line 51
at CodeSearcher.BusinessLogic.CodeSearcherLogic.RunActionWithTimings(String name, Action action) in D:\git\code-searcher\CodeSearcher.Index\CodeSearcherLogic.cs:line 63
at CodeSearcher.BusinessLogic.CodeSearcherLogic.CreateNewIndex(Action startCallback, Action1 fileProccessedCallback, Action2 finishedCallback) in D:\git\code-searcher\CodeSearcher.Index\CodeSearcherLogic.cs:line 48
at CodeSearcher.Program.CreateIndex(ICodeSearcherLogic logic) in D:\git\code-searcher\CodeSearcher\Program.cs:line 92
at CodeSearcher.Program.Main(String[] args) in D:\git\code-searcher\CodeSearcher\Program.cs:line 42
16:57:56 CodeSearcher
16:57:56 CodeSearcher
16:57:56 CodeSearcher
Process terminated. CodeSearcher: unhandled exception occurs
at System.Environment.FailFast(System.String, System.Exception)
at CodeSearcher.Program+<>c.b__12_0(System.Object, System.UnhandledExceptionEventArgs)
at System.Threading.Tasks.Task.Wait(Int32, System.Threading.CancellationToken)
at System.Threading.Tasks.Task.Wait()
at CodeSearcher.BusinessLogic.CodeSearcherLogic+<>c__DisplayClass6_0.b__1()
at CodeSearcher.BusinessLogic.CodeSearcherLogic.RunActionWithTimings(System.String, System.Action)
at CodeSearcher.BusinessLogic.CodeSearcherLogic.CreateNewIndex(System.Action, System.Action1<System.String>, System.Action2<Int64,System.TimeSpan>)
at CodeSearcher.Program.CreateIndex(CodeSearcher.BusinessLogic.ICodeSearcherLogic)
at CodeSearcher.Program.Main(System.String[])
System.AggregateException: One or more errors occurred. (One or more errors occurred. (Source Folder dosn't exist!))
---> System.AggregateException: One or more errors occurred. (Source Folder dosn't exist!)
---> System.ArgumentException: Source Folder dosn't exist!
at CodeSearcher.BusinessLogic.Io.FileReader.<>c__DisplayClass3_0.b__0() in D:\git\code-searcher\CodeSearcher.Index\Io\FileReader.cs:line 38
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at CodeSearcher.BusinessLogic.Indexer.DefaultIndexer.b__11_0() in D:\git\code-searcher\CodeSearcher.Index\Indexer\DefaultIndexer.cs:line 96
at System.Threading.Tasks.Task.InnerInvoke()
at System.Threading.Tasks.Task.<>c.<.cctor>b__277_0(Object obj)
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
--- End of stack trace from previous location ---
at System.Threading.ExecutionContext.RunFromThreadPoolDispatchLoop(Thread threadPoolThread, ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.Tasks.Task.ExecuteWithThreadLocal(Task& currentTaskSlot, Thread threadPoolThread)
--- End of inner exception stack trace ---
at System.Threading.Tasks.Task.Wait(Int32 millisecondsTimeout, CancellationToken cancellationToken)
at System.Threading.Tasks.Task.Wait()
at CodeSearcher.BusinessLogic.CodeSearcherLogic.<>c__DisplayClass6_0.b__1() in D:\git\code-searcher\CodeSearcher.Index\CodeSearcherLogic.cs:line 51
at CodeSearcher.BusinessLogic.CodeSearcherLogic.RunActionWithTimings(String name, Action action) in D:\git\code-searcher\CodeSearcher.Index\CodeSearcherLogic.cs:line 63
at CodeSearcher.BusinessLogic.CodeSearcherLogic.CreateNewIndex(Action startCallback, Action1 fileProccessedCallback, Action2 finishedCallback) in D:\git\code-searcher\CodeSearcher.Index\CodeSearcherLogic.cs:line 48
at CodeSearcher.Program.CreateIndex(ICodeSearcherLogic logic) in D:\git\code-searcher\CodeSearcher\Program.cs:line 92
at CodeSearcher.Program.Main(String[] args) in D:\git\code-searcher\CodeSearcher\Program.cs:line 42

** Correct Usage **
โ€‹D:.\CodeSearcher.exe --mode index --indexPath "D:\git\code-searcher\CodeSearcherTests\SystemTests\DownloadedTestData" --sourcePath "D:\git\code-searcher\CodeSearcherTests\SystemTests\DownloadedTestData\Fifteen Thousand Useful Phrases"
Welcome to CodeSearcher
08:26:49 CodeSearcher Reading Index Overview from C:\Users\lutzb\AppData\Local\code-searcher\IndexOverview.json
08:26:49 CodeSearcher Reading Index Overview from C:\Users\lutzb\AppData\Local\code-searcher\IndexOverview.json


Index of new Source Directory


building search index finished!
0 files indexed
action take : 00:00:00.019

[Feature] WPF App - Filter results by extension

User Story

As a user
I want to filter the list of files with findings
so that I can be faster in analysis

Acceptance Criteria

  • combobox added with all extensions of index
  • List of files with findings is filtered if certain Extension ist selected

Definition of Done

  • All existing tests run successfully
  • No additional compile warnings introduced

[Feature] WebAPI for CodeSearcher

User Story

As a User
I want to access the code-searcher functionality via web mechanism
so that I can use from different clients

Acceptance Criteria

  • functionality available
    • query all indexes [GET]
    • create new index [POST]
    • delete existing index [DELETE]
    • query index by id [GET]
    • search word [GET]
  • API documentation via OpenAPI (Swagger) exist
  • Postman collection exist

Definition of Done

  • WebAPI is documented
  • New tests for WebAPI are added
  • All existing tests run successfully
  • No additional compile warnings introduced

Document CodeSearcher App

CodeSearcher.App is an WPF application but currently the user interface and usage isn't described as part of the documentation.

  • Overview of index
  • Create new Index
  • Delete Existing Index
  • Search in Existing Index
    • look findings

[Feature] WPF App - Add Shortcut to Jump into search field

User Story

As a user
I want to jump to search Textbox by using Keyboard shortcut
so that I can be more productive

Acceptance Criteria

  • ctrl+f2 jumps to search textbox
  • After search the focus is on findings treeview and first result is selected

Definition of Done

  • All existing tests run successfully
  • No additional compile warnings introduced

[Feature] nuget package for code-searcher business logic

User Story

As a Developer
I want to use code-searcher as nuget package from my own application
so that I can integrate the functionality

Acceptance Criteria

  • nuget package can be generated
  • nuget packages are available on nuget.org
  • at least on project is using the nuget packages (instead of project references)

Definition of Done

  • build process of nuget packages is documented
  • All existing tests run successfully
  • No additional compile warnings introduced

[Feature] WPF App search in Document Viewer

User Story

As a developer
I want to be able to search within the open document
so that I better understand the code

Acceptance Criteria

  • ctrl+f short cut to open search window
  • f3 to jump to next finding
  • shift + f3 to Jump to previous finding

Definition of Done

  • All existing tests run successfully
  • No additional compile warnings introduced

[Feature] WPF App - sort findings by name

User Story

As a user
I want to see the files with findings in alphabetical order
so that I can find the right file faster

Acceptance Criteria

  • list with findings is sorted First by filename and second by path (files with Same Name can appear in different folder).

Definition of Done

  • All existing tests run successfully
  • No additional compile warnings introduced

[Feature] activate automatically update of nuget dependencies

User Story

As a Developer
I want to get PRs for new NuGet package versions
so that I can stay up-to-date without manuall update

Acceptance Criteria

  • activate dependabot

Definition of Done

  • dependabot is configured to search on nuget
  • dependabot create PR to nuget branch
  • All existing tests run successfully
  • No additional compile warnings introduced

[Feature] create GUI application

User Story

As a user
I want to have a GUI
so that I can use code-searcher in a Quick and easy way.

Acceptance Criteria

  • App Runs on Windows
  • required features
    • show all existing indexes
    • search within existing Index
      • Show all findings grouped by Filename
      • Jump to file position
    • delete existing Index
    • create new Index

Definition of Done

  • App is documented on Start page
  • All existing tests run successfully
  • No additional compile warnings introduced

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.