mirror of
				https://github.com/BurntSushi/ripgrep.git
				synced 2025-10-30 23:17:47 +02:00 
			
		
		
		
	ci: check docs for all crates
This also replaces '--all' in Cargo commands with '--workspace'. The former has apparently been deprecated. We also fix a couple warnings that this new step detected. Closes #1848
This commit is contained in:
		
				
					committed by
					
						 Andrew Gallant
						Andrew Gallant
					
				
			
			
				
	
			
			
			
						parent
						
							26a29c750e
						
					
				
				
					commit
					b3a6a69f9d
				
			
							
								
								
									
										25
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										25
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -118,10 +118,10 @@ jobs: | ||||
|         echo "target flag is: ${{ env.TARGET_FLAGS }}" | ||||
|  | ||||
|     - name: Build ripgrep and all crates | ||||
|       run: ${{ env.CARGO }} build --verbose --all ${{ env.TARGET_FLAGS }} | ||||
|       run: ${{ env.CARGO }} build --verbose --workspace ${{ env.TARGET_FLAGS }} | ||||
|  | ||||
|     - name: Build ripgrep with PCRE2 | ||||
|       run: ${{ env.CARGO }} build --verbose --all --features pcre2 ${{ env.TARGET_FLAGS }} | ||||
|       run: ${{ env.CARGO }} build --verbose --workspace --features pcre2 ${{ env.TARGET_FLAGS }} | ||||
|  | ||||
|     # This is useful for debugging problems when the expected build artifacts | ||||
|     # (like shell completions and man pages) aren't generated. | ||||
| @@ -139,7 +139,7 @@ jobs: | ||||
|  | ||||
|     - name: Run tests with PCRE2 (sans cross) | ||||
|       if: matrix.target == '' | ||||
|       run: ${{ env.CARGO }} test --verbose --all --features pcre2 ${{ env.TARGET_FLAGS }} | ||||
|       run: ${{ env.CARGO }} test --verbose --workspace --features pcre2 ${{ env.TARGET_FLAGS }} | ||||
|  | ||||
|     - name: Run tests without PCRE2 (with cross) | ||||
|       # These tests should actually work, but they almost double the runtime. | ||||
| @@ -147,7 +147,7 @@ jobs: | ||||
|       # enabled, every integration test is run twice: one with the default | ||||
|       # regex engine and once with PCRE2. | ||||
|       if: matrix.target != '' | ||||
|       run: ${{ env.CARGO }} test --verbose --all ${{ env.TARGET_FLAGS }} | ||||
|       run: ${{ env.CARGO }} test --verbose --workspace ${{ env.TARGET_FLAGS }} | ||||
|  | ||||
|     - name: Test for existence of build artifacts (Windows) | ||||
|       if: matrix.os == 'windows-2019' | ||||
| @@ -194,3 +194,20 @@ jobs: | ||||
|     - name: Check formatting | ||||
|       run: | | ||||
|         cargo fmt --all -- --check | ||||
|  | ||||
|   docs: | ||||
|     name: Docs | ||||
|     runs-on: ubuntu-20.04 | ||||
|     steps: | ||||
|       - name: Checkout repository | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Install Rust | ||||
|         uses: actions-rs/toolchain@v1 | ||||
|         with: | ||||
|           toolchain: stable | ||||
|           profile: minimal | ||||
|           override: true | ||||
|       - name: Check documentation | ||||
|         env: | ||||
|           RUSTDOCFLAGS: -D warnings | ||||
|         run: cargo doc --no-deps --document-private-items --workspace | ||||
|   | ||||
| @@ -4,7 +4,7 @@ | ||||
| /// types to each invocation of ripgrep with the '--type-add' flag. | ||||
| /// | ||||
| /// If you would like to add or improve this list, please file a PR: | ||||
| /// https://github.com/BurntSushi/ripgrep | ||||
| /// <https://github.com/BurntSushi/ripgrep>. | ||||
| /// | ||||
| /// Please try to keep this list sorted lexicographically and wrapped to 79 | ||||
| /// columns (inclusive). | ||||
|   | ||||
| @@ -19,7 +19,7 @@ use word::WordMatcher; | ||||
| /// types of optimizations. | ||||
| /// | ||||
| /// The syntax supported is documented as part of the regex crate: | ||||
| /// https://docs.rs/regex/*/regex/#syntax | ||||
| /// <https://docs.rs/regex/#syntax>. | ||||
| #[derive(Clone, Debug)] | ||||
| pub struct RegexMatcherBuilder { | ||||
|     config: Config, | ||||
| @@ -41,7 +41,7 @@ impl RegexMatcherBuilder { | ||||
|     /// pattern. | ||||
|     /// | ||||
|     /// The syntax supported is documented as part of the regex crate: | ||||
|     /// https://docs.rs/regex/*/regex/#syntax | ||||
|     /// <https://docs.rs/regex/#syntax>. | ||||
|     pub fn build(&self, pattern: &str) -> Result<RegexMatcher, Error> { | ||||
|         let chir = self.config.hir(pattern)?; | ||||
|         let fast_line_regex = chir.fast_line_regex()?; | ||||
|   | ||||
		Reference in New Issue
	
	Block a user