Skip to content
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

Fix xcode warnings 2 #43

Merged
merged 2 commits into from
Mar 20, 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
4 changes: 3 additions & 1 deletion GitClient.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -523,7 +523,7 @@
attributes = {
BuildIndependentTargetsInParallel = 1;
LastSwiftUpdateCheck = 1400;
LastUpgradeCheck = 1600;
LastUpgradeCheck = 1620;
TargetAttributes = {
61347EE928D5D16C00625FC4 = {
CreatedOnToolsVersion = 14.0.1;
Expand Down Expand Up @@ -701,6 +701,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
Expand Down Expand Up @@ -763,6 +764,7 @@
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++20";
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1600"
LastUpgradeVersion = "1620"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
12 changes: 6 additions & 6 deletions GitClient/Views/Commit/ChunkView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import SwiftUI
import Sourceful

struct ChunkView: View {
@State var chunk: Chunk
var chunk: Chunk
var filePath: String
var lexer: Lexer {
get {
Expand All @@ -20,22 +20,22 @@ struct ChunkView: View {

var body: some View {
SourceCodeTextEditor(
text: $chunk.raw,
text: .constant(chunk.raw),
customization: .init(
didChangeText: {_ in },
insertionPointColor: { Sourceful.Color.white },
lexerForSource: { _ in lexer },
textViewDidBeginEditing: { _ in },
theme: { FileDiffTheme() }
),
lineNumbers: $chunk.lineNumbers
lineNumbers: .constant(chunk.lineNumbers)
)
}
}

#Preview {
var filePath = "GitClient/Models/Language.swift"
var text = """
let filePath = "GitClient/Models/Language.swift"
let text = """
@@ -127,9 +127,6 @@ public struct SourceCodeTextEditor: _ViewRepresentable {
// Comment
public func sizeThatFits(_ proposal: ProposedViewSize, nsView: SyntaxTextView, context: Context) -> CGSize? {
Expand All @@ -48,7 +48,7 @@ struct ChunkView: View {
}
"""

var text2 = """
let text2 = """
@@ -12,9 +12,6 @@ public struct SourceCodeTextEditor: _ViewRepresentable {
// Comment
public func sizeThatFits(_ proposal: ProposedViewSize, nsView: SyntaxTextView, context: Context) -> CGSize? {
Expand Down