Skip to content

chore: Misc typos (UI, docs, code...), Makefile PATH with spaces #369

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

Merged
merged 5 commits into from
Jul 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 9 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Changed
- Fixed typos in UI, docs, code [#369](https://github.com/sourcebot-dev/sourcebot/pull/369)

## [4.5.1] - 2025-07-14

### Changed
Expand Down Expand Up @@ -234,7 +239,7 @@ Sourcebot v3 is here and brings a number of structural changes to the tool's fou

### Added

- Added `maxTrigramCount` to the config to control the maximum allowable of trigrams per document.
- Added `maxTrigramCount` to the config to control the maximum allowable of trigrams per document.

### Fixed

Expand Down Expand Up @@ -292,7 +297,7 @@ Sourcebot v3 is here and brings a number of structural changes to the tool's fou
- Added config option `settings.maxFileSize` to control the maximum file size zoekt will index. ([#118](https://github.com/sourcebot-dev/sourcebot/pull/118))

### Fixed

- Fixed syntax highlighting for zoekt query language. ([#115](https://github.com/sourcebot-dev/sourcebot/pull/115))
- Fixed issue with Gerrit repo fetching not paginating. ([#114](https://github.com/sourcebot-dev/sourcebot/pull/114))
- Fixed visual issues with filter panel. ([#105](https://github.com/sourcebot-dev/sourcebot/pull/105))
Expand Down Expand Up @@ -344,13 +349,13 @@ Sourcebot v3 is here and brings a number of structural changes to the tool's fou
### Added

- Added `DOMAIN_SUB_PATH` environment variable to allow overriding the default domain subpath. ([#74](https://github.com/sourcebot-dev/sourcebot/pull/74))
- Added option `all` to the GitLab index schema, allowing for indexing all projects in a self-hosted GitLab instance. ([#84](https://github.com/sourcebot-dev/sourcebot/pull/84))
- Added option `all` to the GitLab index schema, allowing for indexing all projects in a self-hosted GitLab instance. ([#84](https://github.com/sourcebot-dev/sourcebot/pull/84))

## [2.4.3] - 2024-11-18

### Changed

- Bumped NodeJS version to v20. ([#78](https://github.com/sourcebot-dev/sourcebot/pull/78))
- Bumped NodeJS version to v20. ([#78](https://github.com/sourcebot-dev/sourcebot/pull/78))

## [2.4.2] - 2024-11-14

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

6. Create a copy of `.env.development` and name it `.env.development.local`. Update the required environment variables.

7. If you're using a declerative configuration file, create a configuration file and update the `CONFIG_PATH` environment variable in your `.env.development.local` file.
7. If you're using a declarative configuration file, create a configuration file and update the `CONFIG_PATH` environment variable in your `.env.development.local` file.

8. Start Sourcebot with the command:
```sh
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ yarn:
zoekt:
mkdir -p bin
go build -C vendor/zoekt -o $(PWD)/bin ./cmd/...
export PATH=$(PWD)/bin:$(PATH)
export PATH="$(PWD)/bin:$(PATH)"
export CTAGS_COMMANDS=ctags

clean:
Expand Down
6 changes: 6 additions & 0 deletions _typos.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[default.extend-words]
# Don't correct the surname "Do Not Exists"
dne = "dne"

[files]
extend-exclude = ["vendor/**/*", "CHANGELOG.md", "packages/web/src/lib/languageMetadata.ts"]
2 changes: 1 addition & 1 deletion docs/docs/connections/local-repos.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ To get Sourcebot to index these repositories:

<Steps>
<Step title="Mount a volume">
We need to mount a docker volume to the `repos` directory so Sourcebot can read it's contents. Sourcebot will **not** write to local repositories, so we can mount a seperate **read-only** volume:
We need to mount a docker volume to the `repos` directory so Sourcebot can read it's contents. Sourcebot will **not** write to local repositories, so we can mount a separate **read-only** volume:

``` bash
docker run \
Expand Down
6 changes: 3 additions & 3 deletions docs/snippets/schemas/v2/index.schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -685,7 +685,7 @@
"type": "string",
"pattern": ".+"
},
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.",
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always excluded.",
"default": [],
"examples": [
[
Expand Down Expand Up @@ -1387,7 +1387,7 @@
"type": "string",
"pattern": ".+"
},
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.",
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always excluded.",
"default": [],
"examples": [
[
Expand Down Expand Up @@ -2171,7 +2171,7 @@
"type": "string",
"pattern": ".+"
},
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.",
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always excluded.",
"default": [],
"examples": [
[
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/repoCompileUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ export const compileBitbucketConfig = async (
throw new Error(`No links found for ${isServer ? 'server' : 'cloud'} repo ${repoName}`);
}

// In server case we get an array of lenth == 1 links in the self field, while in cloud case we get a single
// In server case we get an array of length == 1 links in the self field, while in cloud case we get a single
// link object in the html field
const link = isServer ? (repoLinks.self as { name: string, href: string }[])?.[0] : repoLinks.html as { href: string };
if (!link || !link.href) {
Expand Down
2 changes: 1 addition & 1 deletion packages/backend/src/repoManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ export class RepoManager implements IRepoManager {
// We can no longer use repo.cloneUrl directly since it doesn't contain the token for security reasons. As a result, we need to
// fetch the token here using the connections from the repo. Multiple connections could be referencing this repo, and each
// may have their own token. This method will just pick the first connection that has a token (if one exists) and uses that. This
// may technically cause syncing to fail if that connection's token just so happens to not have access to the repo it's referrencing.
// may technically cause syncing to fail if that connection's token just so happens to not have access to the repo it's referencing.
private async getCloneCredentialsForRepo(repo: RepoWithConnections, db: PrismaClient): Promise<{ username?: string, password: string } | undefined> {

for (const { connection } of repo.connections) {
Expand Down
2 changes: 1 addition & 1 deletion packages/mcp/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The Sourcebot MCP server gives your LLM agents the ability to fetch code context

- Building custom LLM horizontal agents like like compliance auditing agents, migration agents, etc.
- _"Find all instances of hardcoded credentials"_
- _"Identify repositories that depend on this depreacted api"_
- _"Identify repositories that depend on this deprecated api"_


## Getting Started
Expand Down
8 changes: 4 additions & 4 deletions packages/schemas/src/v2/index.schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -684,7 +684,7 @@ const schema = {
"type": "string",
"pattern": ".+"
},
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.",
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always excluded.",
"default": [],
"examples": [
[
Expand Down Expand Up @@ -1386,7 +1386,7 @@ const schema = {
"type": "string",
"pattern": ".+"
},
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.",
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always excluded.",
"default": [],
"examples": [
[
Expand Down Expand Up @@ -2170,7 +2170,7 @@ const schema = {
"type": "string",
"pattern": ".+"
},
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.",
"description": "List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always excluded.",
"default": [],
"examples": [
[
Expand Down Expand Up @@ -2258,4 +2258,4 @@ const schema = {
},
"additionalProperties": false
} as const;
export { schema as indexSchema };
export { schema as indexSchema };
2 changes: 1 addition & 1 deletion packages/schemas/src/v2/index.type.ts
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ export interface LocalConfig {
watch?: boolean;
exclude?: {
/**
* List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always exluded.
* List of paths relative to the provided `path` to exclude from the index. .git, .hg, and .svn are always excluded.
*/
paths?: string[];
};
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ This package contains shared code between the backend & webapp packages.

### Why two index files?

This package contains two index files: `index.server.ts` and `index.client.ts`. There is some code in this package that will only work in a Node.JS runtime (e.g., because it depends on the `fs` pacakge. Entitlements are a good example of this), and other code that is runtime agnostic (e.g., `constants.ts`). To deal with this, we these two index files export server code and client code, respectively.
This package contains two index files: `index.server.ts` and `index.client.ts`. There is some code in this package that will only work in a Node.JS runtime (e.g., because it depends on the `fs` package. Entitlements are a good example of this), and other code that is runtime agnostic (e.g., `constants.ts`). To deal with this, we these two index files export server code and client code, respectively.

For package consumers, the usage would look like the following:
- Server: `import { ... } from @sourcebot/shared`
Expand Down
6 changes: 3 additions & 3 deletions packages/web/src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ export const withOrgMembership = async <T>(userId: string, domain: string, fn: (
return notFound("User not a member of this organization");
}

const getAuthorizationPrecendence = (role: OrgRole): number => {
const getAuthorizationPrecedence = (role: OrgRole): number => {
switch (role) {
case OrgRole.GUEST:
return 0;
Expand All @@ -153,7 +153,7 @@ export const withOrgMembership = async <T>(userId: string, domain: string, fn: (
}


if (getAuthorizationPrecendence(membership.role) < getAuthorizationPrecendence(minRequiredRole)) {
if (getAuthorizationPrecedence(membership.role) < getAuthorizationPrecedence(minRequiredRole)) {
return {
statusCode: StatusCodes.FORBIDDEN,
errorCode: ErrorCode.INSUFFICIENT_PERMISSIONS,
Expand Down Expand Up @@ -710,7 +710,7 @@ export const getRepoInfoByName = async (repoName: string, domain: string) => sew
// In this scenario, both repos will be named "github.com/sourcebot-dev/sourcebot".
// We will leave this as an edge case for now since it's unlikely to happen in practice.
//
// @v4-todo: we could add a unique contraint on repo name + orgId to help de-duplicate
// @v4-todo: we could add a unique constraint on repo name + orgId to help de-duplicate
// these cases.
// @see: repoCompileUtils.ts
const repo = await prisma.repo.findFirst({
Expand Down
8 changes: 4 additions & 4 deletions packages/web/src/app/[domain]/browse/hooks/utils.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@

export const getBrowseParamsFromPathParam = (pathParam: string) => {
const sentinalIndex = pathParam.search(/\/-\/(tree|blob)/);
if (sentinalIndex === -1) {
const sentinelIndex = pathParam.search(/\/-\/(tree|blob)/);
if (sentinelIndex === -1) {
throw new Error(`Invalid browse pathname: "${pathParam}" - expected to contain "/-/(tree|blob)/" pattern`);
}

const repoAndRevisionPart = pathParam.substring(0, sentinalIndex);
const repoAndRevisionPart = pathParam.substring(0, sentinelIndex);
const lastAtIndex = repoAndRevisionPart.lastIndexOf('@');

const repoName = lastAtIndex === -1 ? repoAndRevisionPart : repoAndRevisionPart.substring(0, lastAtIndex);
const revisionName = lastAtIndex === -1 ? undefined : repoAndRevisionPart.substring(lastAtIndex + 1);

const { path, pathType } = ((): { path: string, pathType: 'tree' | 'blob' } => {
const path = pathParam.substring(sentinalIndex + '/-/'.length);
const path = pathParam.substring(sentinelIndex + '/-/'.length);
const pathType = path.startsWith('tree') ? 'tree' : 'blob';

// @note: decodedURIComponent is needed here incase the path contains a space.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ test('splitQuery groups all parts together when a quote capture group is not clo
expect(cursorIndex).toBe(0);
});

test('splitQuery correclty locates the cursor index given the cursor position (1)', () => {
test('splitQuery correctly locates the cursor index given the cursor position (1)', () => {
const query = 'foo bar "fizz buzz"';

const { queryParts: parts1, cursorIndex: index1 } = splitQuery(query, 0);
Expand All @@ -50,7 +50,7 @@ test('splitQuery correclty locates the cursor index given the cursor position (1
expect(parts3[index3]).toBe('"fizz buzz"');
});

test('splitQuery correclty locates the cursor index given the cursor position (2)', () => {
test('splitQuery correctly locates the cursor index given the cursor position (2)', () => {
const query = 'a b';
expect(splitQuery(query, 0).cursorIndex).toBe(0);
expect(splitQuery(query, 1).cursorIndex).toBe(0);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ export { SearchSuggestionsBox };

export const splitQuery = (query: string, cursorPos: number) => {
const queryParts = [];
const seperator = " ";
const separator = " ";
let cursorIndex = 0;
let accumulator = "";
let isInQuoteCapture = false;
Expand All @@ -452,7 +452,7 @@ export const splitQuery = (query: string, cursorPos: number) => {
isInQuoteCapture = !isInQuoteCapture;
}

if (!isInQuoteCapture && query[i] === seperator) {
if (!isInQuoteCapture && query[i] === separator) {
queryParts.push(accumulator);
accumulator = "";
continue;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export const useSuggestionModeAndQuery = ({
const suggestionModeMappings = useSuggestionModeMappings();

const { suggestionQuery, suggestionMode } = useMemo<{ suggestionQuery: string, suggestionMode: SuggestionMode }>(() => {
// When suggestions are not enabled, fallback to using a sentinal
// When suggestions are not enabled, fallback to using a sentinel
// suggestion mode of "none".
if (!isSuggestionsEnabled) {
return {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const SyntaxReferenceGuide = () => {
<DialogHeader>
<DialogTitle>Syntax Reference Guide</DialogTitle>
<DialogDescription className="text-sm text-foreground">
Queries consist of space-seperated regular expressions. Wrapping expressions in <Code>{`""`}</Code> combines them. By default, a file must have at least one match for each expression to be included.
Queries consist of space-separated regular expressions. Wrapping expressions in <Code>{`""`}</Code> combines them. By default, a file must have at least one match for each expression to be included.
</DialogDescription>
</DialogHeader>
<Table>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export function ChangeOrgNameCard({ orgName, currentUserRole }: ChangeOrgNameCar
<CardTitle>
Organization Name
</CardTitle>
<CardDescription>{`Your organization's visible name within Sourceobot. For example, the name of your company or department.`}</CardDescription>
<CardDescription>{`Your organization's visible name within Sourcebot. For example, the name of your company or department.`}</CardDescription>
</CardHeader>
<CardContent>
<Form {...form}>
Expand Down
2 changes: 1 addition & 1 deletion packages/web/src/app/components/syntaxReferenceGuide.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export const SyntaxReferenceGuide = () => {
<DialogHeader>
<DialogTitle>Syntax Reference Guide</DialogTitle>
<DialogDescription className="text-sm text-foreground">
Queries consist of space-seperated regular expressions. Wrapping expressions in <Code>{`""`}</Code> combines them. By default, a file must have at least one match for each expression to be included.
Queries consist of space-separated regular expressions. Wrapping expressions in <Code>{`""`}</Code> combines them. By default, a file must have at least one match for each expression to be included.
</DialogDescription>
</DialogHeader>
<Table>
Expand Down
Loading