hind 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +85 -15
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/lib/hind/version.rb +1 -1
- metadata +6 -7
- /data/{exe → bin}/hind +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 32bbe6d5a60d938e3488b900d71934deece01265da3ad23b62ab75fef4a84886
|
4
|
+
data.tar.gz: c4e90be47c9b2c73b56e0f861753dda011dd8429adb79467804162955601ee88
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ecd7c81c2c9ef20610421321724e7c559b6a54044e947bead98449cea231dcc27d2c21215ec3ed64d5b62cfc0534e64674dabeace288d7a75dca828755ed58
|
7
|
+
data.tar.gz: 52a181f665a67514012349f3886edceb771a7771225da08dfe69fdf8969264c34df0d650a6adecb98c375ce840a0d102b0ecc2b422a64ab0cb2fb62e17f85475
|
data/README.md
CHANGED
@@ -1,39 +1,109 @@
|
|
1
1
|
# Hind
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/hind`. To experiment with that code, run `bin/console` for an interactive prompt.
|
3
|
+
Hind is a Ruby gem for generating code intelligence data in LSIF (Language Server Index Format) and SCIP (Sourcegraph Code Intelligence Protocol) formats. It helps create index files that power code navigation features like go-to-definition, find references, and hover documentation.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
Install the gem and add to the application's Gemfile by executing:
|
7
|
+
Install the gem:
|
12
8
|
|
13
9
|
```bash
|
14
|
-
|
10
|
+
gem install hind
|
15
11
|
```
|
16
12
|
|
17
|
-
|
13
|
+
Or add it to your Gemfile:
|
18
14
|
|
19
|
-
```
|
20
|
-
gem
|
15
|
+
```ruby
|
16
|
+
gem 'hind'
|
21
17
|
```
|
22
18
|
|
23
19
|
## Usage
|
24
20
|
|
25
|
-
|
21
|
+
### Generating LSIF Data
|
22
|
+
|
23
|
+
To generate LSIF data for your Ruby project:
|
24
|
+
|
25
|
+
```bash
|
26
|
+
# Basic usage
|
27
|
+
hind lsif
|
28
|
+
|
29
|
+
# Specify directory and output file
|
30
|
+
hind lsif -d /path/to/project -o output.lsif
|
31
|
+
|
32
|
+
# Process specific files with glob pattern
|
33
|
+
hind lsif -g "lib/**/*.rb"
|
34
|
+
|
35
|
+
# Exclude patterns
|
36
|
+
hind lsif -e "test/**/*" -e "spec/**/*"
|
37
|
+
|
38
|
+
# Verbose output
|
39
|
+
hind lsif -v
|
40
|
+
```
|
41
|
+
|
42
|
+
Options:
|
43
|
+
- `-d, --directory DIR` - Root directory to process (default: current directory)
|
44
|
+
- `-o, --output FILE` - Output file path (default: dump.lsif)
|
45
|
+
- `-g, --glob PATTERN` - File pattern to match (default: **/*.rb)
|
46
|
+
- `-f, --force` - Overwrite output file if it exists
|
47
|
+
- `-e, --exclude PATTERN` - Patterns to exclude (can be specified multiple times)
|
48
|
+
- `-v, --verbose` - Enable verbose output
|
49
|
+
- `-c, --config FILE` - Path to configuration file
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
### GitLab Integration
|
54
|
+
|
55
|
+
To use Hind with GitLab for code intelligence:
|
56
|
+
|
57
|
+
1. Add this to your `.gitlab-ci.yml`:
|
58
|
+
|
59
|
+
```yaml
|
60
|
+
lsif:
|
61
|
+
stage: lsif
|
62
|
+
script:
|
63
|
+
- gem install hind
|
64
|
+
- hind lsif -d . -o dump.lsif -v
|
65
|
+
artifacts:
|
66
|
+
reports:
|
67
|
+
lsif: dump.lsif
|
68
|
+
```
|
69
|
+
|
70
|
+
2. GitLab will automatically process the LSIF data and enable code intelligence features.
|
71
|
+
|
72
|
+
## Features
|
73
|
+
|
74
|
+
- Generates LSIF data for Ruby code
|
75
|
+
- Supports code intelligence features:
|
76
|
+
- Go to definition
|
77
|
+
- Find references
|
78
|
+
- Hover documentation
|
79
|
+
- Symbol search
|
80
|
+
- Integrates with GitLab code intelligence
|
81
|
+
- Configurable output and processing
|
82
|
+
- Comprehensive error checking and reporting
|
26
83
|
|
27
84
|
## Development
|
28
85
|
|
29
|
-
After checking out the repo
|
86
|
+
After checking out the repo:
|
30
87
|
|
31
|
-
|
88
|
+
1. Install dependencies:
|
89
|
+
```bash
|
90
|
+
bundle install
|
91
|
+
```
|
92
|
+
|
93
|
+
2. Run tests:
|
94
|
+
```bash
|
95
|
+
bundle exec rspec
|
96
|
+
```
|
97
|
+
|
98
|
+
3. Run the gem locally:
|
99
|
+
```bash
|
100
|
+
bundle exec bin/hind
|
101
|
+
```
|
32
102
|
|
33
103
|
## Contributing
|
34
104
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
105
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/yourusername/hind.
|
36
106
|
|
37
107
|
## License
|
38
108
|
|
39
|
-
The gem is available as open source under the terms of the
|
109
|
+
The gem is available as open source under the terms of the MIT License.
|
data/bin/console
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
require "bundler/setup"
|
5
|
+
require "hind"
|
6
|
+
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
9
|
+
|
10
|
+
require "irb"
|
11
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/hind/version.rb
CHANGED
metadata
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hind
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aboobacker MK
|
8
|
-
|
9
|
-
bindir: exe
|
8
|
+
bindir: bin
|
10
9
|
cert_chain: []
|
11
10
|
date: 2025-02-09 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
@@ -104,7 +103,9 @@ extra_rdoc_files: []
|
|
104
103
|
files:
|
105
104
|
- LICENSE.txt
|
106
105
|
- README.md
|
107
|
-
-
|
106
|
+
- bin/console
|
107
|
+
- bin/hind
|
108
|
+
- bin/setup
|
108
109
|
- lib/hind.rb
|
109
110
|
- lib/hind/cli.rb
|
110
111
|
- lib/hind/lsif.rb
|
@@ -126,7 +127,6 @@ metadata:
|
|
126
127
|
homepage_uri: https://github.com/tachyons/hind
|
127
128
|
source_code_uri: https://github.com/tachyons/hind
|
128
129
|
changelog_uri: https://github.com/tachyons/hind/blob/main/CHANGELOG.md
|
129
|
-
post_install_message:
|
130
130
|
rdoc_options: []
|
131
131
|
require_paths:
|
132
132
|
- lib
|
@@ -141,8 +141,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
141
141
|
- !ruby/object:Gem::Version
|
142
142
|
version: '0'
|
143
143
|
requirements: []
|
144
|
-
rubygems_version: 3.
|
145
|
-
signing_key:
|
144
|
+
rubygems_version: 3.6.2
|
146
145
|
specification_version: 4
|
147
146
|
summary: LSIF and SCIP generator for Ruby
|
148
147
|
test_files: []
|
/data/{exe → bin}/hind
RENAMED
File without changes
|